Refactor: Strip trailing whitespace

pull/566/head
Richard 2015-05-18 22:17:45 -06:00
parent 5dbd676c01
commit 6da45599c0
40 changed files with 1208 additions and 1208 deletions

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,16 +23,16 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -57,7 +57,7 @@ struct LogStreamInfo;
#define ASSIMP_DEFAULT_LOG_NAME "AssimpLog.txt" #define ASSIMP_DEFAULT_LOG_NAME "AssimpLog.txt"
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
/** @brief CPP-API: Primary logging facility of Assimp. /** @brief CPP-API: Primary logging facility of Assimp.
* *
* The library stores its primary #Logger as a static member of this class. * The library stores its primary #Logger as a static member of this class.
* #get() returns this primary logger. By default the underlying implementation is * #get() returns this primary logger. By default the underlying implementation is
@ -65,7 +65,7 @@ struct LogStreamInfo;
* is turned on. To capture the log output multiple log streams (#LogStream) can be * is turned on. To capture the log output multiple log streams (#LogStream) can be
* attach to the logger. Some default streams for common streaming locations (such as * attach to the logger. Some default streams for common streaming locations (such as
* a file, std::cout, OutputDebugString()) are also provided. * a file, std::cout, OutputDebugString()) are also provided.
* *
* If you wish to customize the logging at an even deeper level supply your own * If you wish to customize the logging at an even deeper level supply your own
* implementation of #Logger to #set(). * implementation of #Logger to #set().
* @note The whole logging stuff causes a small extra overhead for all imports. */ * @note The whole logging stuff causes a small extra overhead for all imports. */
@ -77,13 +77,13 @@ public:
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @brief Creates a logging instance. /** @brief Creates a logging instance.
* @param name Name for log file. Only valid in combination * @param name Name for log file. Only valid in combination
* with the aiDefaultLogStream_FILE flag. * with the aiDefaultLogStream_FILE flag.
* @param severity Log severity, VERBOSE turns on debug messages * @param severity Log severity, VERBOSE turns on debug messages
* @param defStreams Default log streams to be attached. Any bitwise * @param defStreams Default log streams to be attached. Any bitwise
* combination of the aiDefaultLogStream enumerated values. * combination of the aiDefaultLogStream enumerated values.
* If #aiDefaultLogStream_FILE is specified but an empty string is * If #aiDefaultLogStream_FILE is specified but an empty string is
* passed for 'name', no log file is created at all. * passed for 'name', no log file is created at all.
* @param io IOSystem to be used to open external files (such as the * @param io IOSystem to be used to open external files (such as the
* log file). Pass NULL to rely on the default implementation. * log file). Pass NULL to rely on the default implementation.
* This replaces the default #NullLogger with a #DefaultLogger instance. */ * This replaces the default #NullLogger with a #DefaultLogger instance. */
static Logger *create(const char* name = ASSIMP_DEFAULT_LOG_NAME, static Logger *create(const char* name = ASSIMP_DEFAULT_LOG_NAME,
@ -96,14 +96,14 @@ public:
* *
* Use this if the provided #DefaultLogger class doesn't fit into * Use this if the provided #DefaultLogger class doesn't fit into
* your needs. If the provided message formatting is OK for you, * your needs. If the provided message formatting is OK for you,
* it's much easier to use #create() and to attach your own custom * it's much easier to use #create() and to attach your own custom
* output streams to it. * output streams to it.
* @param logger Pass NULL to setup a default NullLogger*/ * @param logger Pass NULL to setup a default NullLogger*/
static void set (Logger *logger); static void set (Logger *logger);
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @brief Getter for singleton instance /** @brief Getter for singleton instance
* @return Only instance. This is never null, but it could be a * @return Only instance. This is never null, but it could be a
* NullLogger. Use isNullLogger to check this.*/ * NullLogger. Use isNullLogger to check this.*/
static Logger *get(); static Logger *get();
@ -113,12 +113,12 @@ public:
* Use create() or set() to setup a logger that does actually do * Use create() or set() to setup a logger that does actually do
* something else than just rejecting all log messages. */ * something else than just rejecting all log messages. */
static bool isNullLogger(); static bool isNullLogger();
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @brief Kills the current singleton logger and replaces it with a /** @brief Kills the current singleton logger and replaces it with a
* #NullLogger instance. */ * #NullLogger instance. */
static void kill(); static void kill();
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @copydoc Logger::attachStream */ /** @copydoc Logger::attachStream */
bool attachStream(LogStream *pStream, bool attachStream(LogStream *pStream,
@ -126,7 +126,7 @@ public:
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @copydoc Logger::detatchStream */ /** @copydoc Logger::detatchStream */
bool detatchStream(LogStream *pStream, bool detatchStream(LogStream *pStream,
unsigned int severity); unsigned int severity);
@ -136,7 +136,7 @@ private:
/** @briefPrivate construction for internal use by create(). /** @briefPrivate construction for internal use by create().
* @param severity Logging granularity */ * @param severity Logging granularity */
DefaultLogger(LogSeverity severity); DefaultLogger(LogSeverity severity);
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @briefDestructor */ /** @briefDestructor */
~DefaultLogger(); ~DefaultLogger();
@ -151,7 +151,7 @@ private:
/** @brief Logs a warning message */ /** @brief Logs a warning message */
void OnWarn(const char* message); void OnWarn(const char* message);
/** @brief Logs an error message */ /** @brief Logs an error message */
void OnError(const char* message); void OnError(const char* message);
@ -161,7 +161,7 @@ private:
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @brief Returns the thread id. /** @brief Returns the thread id.
* @note This is an OS specific feature, if not supported, a * @note This is an OS specific feature, if not supported, a
* zero will be returned. * zero will be returned.
*/ */
unsigned int GetThreadID(); unsigned int GetThreadID();

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2011, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ contributors may be used to endorse or promote products
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -56,22 +56,22 @@ namespace Assimp {
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** CPP-API: The Exporter class forms an C++ interface to the export functionality /** CPP-API: The Exporter class forms an C++ interface to the export functionality
* of the Open Asset Import Library. Note that the export interface is available * of the Open Asset Import Library. Note that the export interface is available
* only if Assimp has been built with ASSIMP_BUILD_NO_EXPORT not defined. * only if Assimp has been built with ASSIMP_BUILD_NO_EXPORT not defined.
* *
* The interface is modelled after the importer interface and mostly * The interface is modelled after the importer interface and mostly
* symmetric. The same rules for threading etc. apply. * symmetric. The same rules for threading etc. apply.
* *
* In a nutshell, there are two export interfaces: #Export, which writes the * In a nutshell, there are two export interfaces: #Export, which writes the
* output file(s) either to the regular file system or to a user-supplied * output file(s) either to the regular file system or to a user-supplied
* #IOSystem, and #ExportToBlob which returns a linked list of memory * #IOSystem, and #ExportToBlob which returns a linked list of memory
* buffers (blob), each referring to one output file (in most cases * buffers (blob), each referring to one output file (in most cases
* there will be only one output file of course, but this extra complexity is * there will be only one output file of course, but this extra complexity is
* needed since Assimp aims at supporting a wide range of file formats). * needed since Assimp aims at supporting a wide range of file formats).
* *
* #ExportToBlob is especially useful if you intend to work * #ExportToBlob is especially useful if you intend to work
* with the data in-memory. * with the data in-memory.
*/ */
class ASSIMP_API ExportProperties; class ASSIMP_API ExportProperties;
@ -122,7 +122,7 @@ public:
public: public:
Exporter(); Exporter();
~Exporter(); ~Exporter();
@ -131,18 +131,18 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Supplies a custom IO handler to the exporter to use to open and /** Supplies a custom IO handler to the exporter to use to open and
* access files. * access files.
*
* If you need #Export to use custom IO logic to access the files,
* you need to supply a custom implementation of IOSystem and
* IOFile to the exporter.
* *
* #Exporter takes ownership of the object and will destroy it * If you need #Export to use custom IO logic to access the files,
* you need to supply a custom implementation of IOSystem and
* IOFile to the exporter.
*
* #Exporter takes ownership of the object and will destroy it
* afterwards. The previously assigned handler will be deleted. * afterwards. The previously assigned handler will be deleted.
* Pass NULL to take again ownership of your IOSystem and reset Assimp * Pass NULL to take again ownership of your IOSystem and reset Assimp
* to use its default implementation, which uses plain file IO. * to use its default implementation, which uses plain file IO.
* *
* @param pIOHandler The IO handler to be used in all file accesses * @param pIOHandler The IO handler to be used in all file accesses
* of the Importer. */ * of the Importer. */
void SetIOHandler( IOSystem* pIOHandler); void SetIOHandler( IOSystem* pIOHandler);
@ -156,8 +156,8 @@ public:
IOSystem* GetIOHandler() const; IOSystem* GetIOHandler() const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Checks whether a default IO handler is active /** Checks whether a default IO handler is active
* A default handler is active as long the application doesn't * A default handler is active as long the application doesn't
* supply its own custom IO handler via #SetIOHandler(). * supply its own custom IO handler via #SetIOHandler().
* @return true by default */ * @return true by default */
bool IsDefaultIOHandler() const; bool IsDefaultIOHandler() const;
@ -165,20 +165,20 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Exports the given scene to a chosen file format. Returns the exported /** Exports the given scene to a chosen file format. Returns the exported
* data as a binary blob which you can write into a file or something. * data as a binary blob which you can write into a file or something.
* When you're done with the data, simply let the #Exporter instance go * When you're done with the data, simply let the #Exporter instance go
* out of scope to have it released automatically. * out of scope to have it released automatically.
* @param pScene The scene to export. Stays in possession of the caller, * @param pScene The scene to export. Stays in possession of the caller,
* is not changed by the function. * is not changed by the function.
* @param pFormatId ID string to specify to which format you want to * @param pFormatId ID string to specify to which format you want to
* export to. Use * export to. Use
* #GetExportFormatCount / #GetExportFormatDescription to learn which * #GetExportFormatCount / #GetExportFormatDescription to learn which
* export formats are available. * export formats are available.
* @param pPreprocessing See the documentation for #Export * @param pPreprocessing See the documentation for #Export
* @return the exported data or NULL in case of error. * @return the exported data or NULL in case of error.
* @note If the Exporter instance did already hold a blob from * @note If the Exporter instance did already hold a blob from
* a previous call to #ExportToBlob, it will be disposed. * a previous call to #ExportToBlob, it will be disposed.
* Any IO handlers set via #SetIOHandler are ignored here. * Any IO handlers set via #SetIOHandler are ignored here.
* @note Use aiCopyScene() to get a modifiable copy of a previously * @note Use aiCopyScene() to get a modifiable copy of a previously
* imported scene. */ * imported scene. */
@ -194,11 +194,11 @@ public:
* @param pPath Full target file name. Target must be accessible. * @param pPath Full target file name. Target must be accessible.
* @param pPreprocessing Accepts any choice of the #aiPostProcessSteps enumerated * @param pPreprocessing Accepts any choice of the #aiPostProcessSteps enumerated
* flags, but in reality only a subset of them makes sense here. Specifying * flags, but in reality only a subset of them makes sense here. Specifying
* 'preprocessing' flags is useful if the input scene does not conform to * 'preprocessing' flags is useful if the input scene does not conform to
* Assimp's default conventions as specified in the @link data Data Structures Page @endlink. * Assimp's default conventions as specified in the @link data Data Structures Page @endlink.
* In short, this means the geometry data should use a right-handed coordinate systems, face * In short, this means the geometry data should use a right-handed coordinate systems, face
* winding should be counter-clockwise and the UV coordinate origin is assumed to be in * winding should be counter-clockwise and the UV coordinate origin is assumed to be in
* the upper left. The #aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and * the upper left. The #aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and
* #aiProcess_FlipWindingOrder flags are used in the import side to allow users * #aiProcess_FlipWindingOrder flags are used in the import side to allow users
* to have those defaults automatically adapted to their conventions. Specifying those flags * to have those defaults automatically adapted to their conventions. Specifying those flags
* for exporting has the opposite effect, respectively. Some other of the * for exporting has the opposite effect, respectively. Some other of the
@ -206,17 +206,17 @@ public:
* to try out what their effect on the exported file is. Many formats impose * to try out what their effect on the exported file is. Many formats impose
* their own restrictions on the structure of the geometry stored therein, * their own restrictions on the structure of the geometry stored therein,
* so some preprocessing may have little or no effect at all, or may be * so some preprocessing may have little or no effect at all, or may be
* redundant as exporters would apply them anyhow. A good example * redundant as exporters would apply them anyhow. A good example
* is triangulation - whilst you can enforce it by specifying * is triangulation - whilst you can enforce it by specifying
* the #aiProcess_Triangulate flag, most export formats support only * the #aiProcess_Triangulate flag, most export formats support only
* triangulate data so they would run the step even if it wasn't requested. * triangulate data so they would run the step even if it wasn't requested.
* *
* If assimp detects that the input scene was directly taken from the importer side of * If assimp detects that the input scene was directly taken from the importer side of
* the library (i.e. not copied using aiCopyScene and potetially modified afterwards), * the library (i.e. not copied using aiCopyScene and potetially modified afterwards),
* any postprocessing steps already applied to the scene will not be applied again, unless * any postprocessing steps already applied to the scene will not be applied again, unless
* they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and * they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and
* #aiProcess_FlipWindingOrder). * #aiProcess_FlipWindingOrder).
* @return AI_SUCCESS if everything was fine. * @return AI_SUCCESS if everything was fine.
* @note Use aiCopyScene() to get a modifiable copy of a previously * @note Use aiCopyScene() to get a modifiable copy of a previously
* imported scene.*/ * imported scene.*/
aiReturn Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = NULL); aiReturn Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing = 0u, const ExportProperties* pProperties = NULL);
@ -228,10 +228,10 @@ public:
* or #ExportToBlob * or #ExportToBlob
* *
* Returns an empty string if no error occurred. * Returns an empty string if no error occurred.
* @return A description of the last error, an empty string if no * @return A description of the last error, an empty string if no
* error occurred. The string is never NULL. * error occurred. The string is never NULL.
* *
* @note The returned function remains valid until one of the * @note The returned function remains valid until one of the
* following methods is called: #Export, #ExportToBlob, #FreeBlob */ * following methods is called: #Export, #ExportToBlob, #FreeBlob */
const char* GetErrorString() const; const char* GetErrorString() const;
@ -251,7 +251,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Frees the current blob. /** Frees the current blob.
* *
* The function does nothing if no blob has previously been * The function does nothing if no blob has previously been
* previously produced via #ExportToBlob. #FreeBlob is called * previously produced via #ExportToBlob. #FreeBlob is called
* automatically by the destructor. The only reason to call * automatically by the destructor. The only reason to call
* it manually would be to reclain as much storage as possible * it manually would be to reclain as much storage as possible
@ -272,17 +272,17 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Returns a description of the nth export file format. Use # /** Returns a description of the nth export file format. Use #
* #Exporter::GetExportFormatCount to learn how many export * #Exporter::GetExportFormatCount to learn how many export
* formats are supported. * formats are supported.
* *
* The returned pointer is of static storage duration iff the * The returned pointer is of static storage duration iff the
* pIndex pertains to a built-in exporter (i.e. one not registered * pIndex pertains to a built-in exporter (i.e. one not registered
* via #RegistrerExporter). It is restricted to the life-time of the * via #RegistrerExporter). It is restricted to the life-time of the
* #Exporter instance otherwise. * #Exporter instance otherwise.
* *
* @param pIndex Index of the export format to retrieve information * @param pIndex Index of the export format to retrieve information
* for. Valid range is 0 to #Exporter::GetExportFormatCount * for. Valid range is 0 to #Exporter::GetExportFormatCount
* @return A description of that specific export format. * @return A description of that specific export format.
* NULL if pIndex is out of range. */ * NULL if pIndex is out of range. */
const aiExportFormatDesc* GetExportFormatDescription( size_t pIndex ) const; const aiExportFormatDesc* GetExportFormatDescription( size_t pIndex ) const;
@ -307,7 +307,7 @@ public:
* builtin exporters because those are implicitly registered * builtin exporters because those are implicitly registered
* using #RegisterExporter). * using #RegisterExporter).
* @param id Format id to be unregistered, this refers to the * @param id Format id to be unregistered, this refers to the
* 'id' field of #aiExportFormatDesc. * 'id' field of #aiExportFormatDesc.
* @note Calling this method on a format description not yet registered * @note Calling this method on a format description not yet registered
* has no effect.*/ * has no effect.*/
void UnregisterExporter(const char* id); void UnregisterExporter(const char* id);
@ -325,7 +325,7 @@ class ASSIMP_API ExportProperties
public: public:
// Data type to store the key hash // Data type to store the key hash
typedef unsigned int KeyType; typedef unsigned int KeyType;
// typedefs for our four configuration maps. // typedefs for our four configuration maps.
// We don't need more, so there is no need for a generic solution // We don't need more, so there is no need for a generic solution
typedef std::map<KeyType, int> IntPropertyMap; typedef std::map<KeyType, int> IntPropertyMap;
@ -343,7 +343,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Copy constructor. /** Copy constructor.
* *
* This copies the configuration properties of another ExportProperties. * This copies the configuration properties of another ExportProperties.
* @see ExportProperties(const ExportProperties& other) * @see ExportProperties(const ExportProperties& other)
*/ */
@ -358,7 +358,7 @@ public:
* @return true if the property was set before. The new value replaces * @return true if the property was set before. The new value replaces
* the previous value in this case. * the previous value in this case.
* @note Property of different types (float, int, string ..) are kept * @note Property of different types (float, int, string ..) are kept
* on different stacks, so calling SetPropertyInteger() for a * on different stacks, so calling SetPropertyInteger() for a
* floating-point property has no effect - the loader will call * floating-point property has no effect - the loader will call
* GetPropertyFloat() to read the property, but it won't be there. * GetPropertyFloat() to read the property, but it won't be there.
*/ */
@ -398,15 +398,15 @@ public:
* @param szName Name of the property. All supported properties * @param szName Name of the property. All supported properties
* are defined in the aiConfig.g header (all constants share the * are defined in the aiConfig.g header (all constants share the
* prefix AI_CONFIG_XXX). * prefix AI_CONFIG_XXX).
* @param iErrorReturn Value that is returned if the property * @param iErrorReturn Value that is returned if the property
* is not found. * is not found.
* @return Current value of the property * @return Current value of the property
* @note Property of different types (float, int, string ..) are kept * @note Property of different types (float, int, string ..) are kept
* on different lists, so calling SetPropertyInteger() for a * on different lists, so calling SetPropertyInteger() for a
* floating-point property has no effect - the loader will call * floating-point property has no effect - the loader will call
* GetPropertyFloat() to read the property, but it won't be there. * GetPropertyFloat() to read the property, but it won't be there.
*/ */
int GetPropertyInteger(const char* szName, int GetPropertyInteger(const char* szName,
int iErrorReturn = 0xffffffff) const; int iErrorReturn = 0xffffffff) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -424,7 +424,7 @@ public:
/** Get a floating-point configuration property /** Get a floating-point configuration property
* @see GetPropertyInteger() * @see GetPropertyInteger()
*/ */
float GetPropertyFloat(const char* szName, float GetPropertyFloat(const char* szName,
float fErrorReturn = 10e10f) const; float fErrorReturn = 10e10f) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -488,7 +488,7 @@ protected:
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
inline const aiExportDataBlob* Exporter :: ExportToBlob( const aiScene* pScene, const std::string& pFormatId,unsigned int pPreprocessing, const ExportProperties* pProperties) inline const aiExportDataBlob* Exporter :: ExportToBlob( const aiScene* pScene, const std::string& pFormatId,unsigned int pPreprocessing, const ExportProperties* pProperties)
{ {
return ExportToBlob(pScene,pFormatId.c_str(),pPreprocessing, pProperties); return ExportToBlob(pScene,pFormatId.c_str(),pPreprocessing, pProperties);
} }

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,21 +25,21 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
/** @file IOStream.hpp /** @file IOStream.hpp
* @brief File I/O wrappers for C++. * @brief File I/O wrappers for C++.
*/ */
#ifndef AI_IOSTREAM_H_INC #ifndef AI_IOSTREAM_H_INC
@ -72,8 +72,8 @@ protected:
public: public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief 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. * alternatively you may use IOSystem::Close() to release the file.
*/ */
virtual ~IOStream(); virtual ~IOStream();
@ -82,8 +82,8 @@ public:
* *
* See fread() for more details * See fread() for more details
* This fails for write-only files */ * This fails for write-only files */
virtual size_t Read(void* pvBuffer, virtual size_t Read(void* pvBuffer,
size_t pSize, size_t pSize,
size_t pCount) = 0; size_t pCount) = 0;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -91,7 +91,7 @@ public:
* *
* See fwrite() for more details * See fwrite() for more details
* This fails for read-only files */ * 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 pSize,
size_t pCount) = 0; size_t pCount) = 0;
@ -115,7 +115,7 @@ public:
virtual size_t FileSize() const = 0; virtual size_t FileSize() const = 0;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Flush the contents of the file buffer (for writers) /** @brief Flush the contents of the file buffer (for writers)
* See fflush() for more details. * See fflush() for more details.
*/ */
virtual void Flush() = 0; virtual void Flush() = 0;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -74,7 +74,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Default constructor. /** @brief Default constructor.
* *
* Create an instance of your derived class and assign it to an * Create an instance of your derived class and assign it to an
* #Assimp::Importer instance by calling Importer::SetIOHandler(). * #Assimp::Importer instance by calling Importer::SetIOHandler().
*/ */
IOSystem(); IOSystem();
@ -97,7 +97,7 @@ public:
AI_FORCE_INLINE bool Exists( const std::string& pFile) const; AI_FORCE_INLINE bool Exists( const std::string& pFile) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief 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 * @param pFile Path to the file
* @return true if there is a file with this path, else false. * @return true if there is a file with this path, else false.
@ -125,9 +125,9 @@ public:
* "rb", "r", "rt". * "rb", "r", "rt".
* *
* @return New IOStream interface allowing the lib to access * @return New IOStream interface allowing the lib to access
* the underlying file. * the underlying file.
* @note When implementing this class to provide custom IO handling, * @note When implementing this class to provide custom IO handling,
* you probably have to supply an own implementation of IOStream as well. * you probably have to supply an own implementation of IOStream as well.
*/ */
virtual IOStream* Open(const char* pFile, virtual IOStream* Open(const char* pFile,
const char* pMode = "rb") = 0; const char* pMode = "rb") = 0;
@ -142,7 +142,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Closes the given file and releases all resources /** @brief Closes the given file and releases all resources
* associated with it. * associated with it.
* @param pFile The file instance previously created by Open(). * @param pFile The file instance previously created by Open().
*/ */
@ -151,8 +151,8 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Compares two paths and check whether the point to /** @brief Compares two paths and check whether the point to
* identical files. * identical files.
* *
* The dummy implementation of this virtual member performs a * The dummy implementation of this virtual member performs a
* case-insensitive comparison of the given strings. The default IO * case-insensitive comparison of the given strings. The default IO
* system implementation uses OS mechanisms to convert relative into * system implementation uses OS mechanisms to convert relative into
* absolute paths, so the result can be trusted. * absolute paths, so the result can be trusted.
@ -161,32 +161,32 @@ public:
* @return true if the paths point to the same file. The file needn't * @return true if the paths point to the same file. The file needn't
* be existing, however. * be existing, however.
*/ */
virtual bool ComparePaths (const char* one, virtual bool ComparePaths (const char* one,
const char* second) const; const char* second) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief For backward compatibility /** @brief For backward compatibility
* @see ComparePaths(const char*, const char*) * @see ComparePaths(const char*, const char*)
*/ */
inline bool ComparePaths (const std::string& one, inline bool ComparePaths (const std::string& one,
const std::string& second) const; const std::string& second) const;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
AI_FORCE_INLINE IOSystem::IOSystem() AI_FORCE_INLINE IOSystem::IOSystem()
{ {
// empty // empty
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
AI_FORCE_INLINE IOSystem::~IOSystem() AI_FORCE_INLINE IOSystem::~IOSystem()
{ {
// empty // empty
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// For compatibility, the interface of some functions taking a std::string was // For compatibility, the interface of some functions taking a std::string was
// changed to const char* to avoid crashes between binary incompatible STL // changed to const char* to avoid crashes between binary incompatible STL
// versions. This code her is inlined, so it shouldn't cause any problems. // versions. This code her is inlined, so it shouldn't cause any problems.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -196,7 +196,7 @@ AI_FORCE_INLINE IOStream* IOSystem::Open(const std::string& pFile,
{ {
// NOTE: // NOTE:
// For compatibility, interface was changed to const char* to // For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions // avoid crashes between binary incompatible STL versions
return Open(pFile.c_str(),pMode.c_str()); return Open(pFile.c_str(),pMode.c_str());
} }
@ -205,17 +205,17 @@ AI_FORCE_INLINE bool IOSystem::Exists( const std::string& pFile) const
{ {
// NOTE: // NOTE:
// For compatibility, interface was changed to const char* to // For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions // avoid crashes between binary incompatible STL versions
return Exists(pFile.c_str()); return Exists(pFile.c_str());
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
inline bool IOSystem::ComparePaths (const std::string& one, inline bool IOSystem::ComparePaths (const std::string& one,
const std::string& second) const const std::string& second) const
{ {
// NOTE: // NOTE:
// For compatibility, interface was changed to const char* to // For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions // avoid crashes between binary incompatible STL versions
return ComparePaths(one.c_str(),second.c_str()); return ComparePaths(one.c_str(),second.c_str());
} }

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_ASSIMP_HPP #define INCLUDED_AI_ASSIMP_HPP
#ifndef __cplusplus #ifndef __cplusplus
# error This header requires C++ to be used. Use assimp.h for plain C. # error This header requires C++ to be used. Use assimp.h for plain C.
#endif #endif
// Public ASSIMP data structures // Public ASSIMP data structures
@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp { namespace Assimp {
// ======================================================================= // =======================================================================
// Public interface to Assimp // Public interface to Assimp
class Importer; class Importer;
class Exporter; // export.hpp class Exporter; // export.hpp
class IOStream; class IOStream;
@ -71,7 +71,7 @@ namespace Assimp {
class BaseImporter; class BaseImporter;
class BaseProcess; class BaseProcess;
class SharedPostProcessInfo; class SharedPostProcessInfo;
class BatchLoader; class BatchLoader;
// ======================================================================= // =======================================================================
// Holy stuff, only for members of the high council of the Jedi. // Holy stuff, only for members of the high council of the Jedi.
@ -90,24 +90,24 @@ struct aiImporterDesc;
namespace Assimp { namespace Assimp {
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** CPP-API: The Importer class forms an C++ interface to the functionality of the /** CPP-API: The Importer class forms an C++ interface to the functionality of the
* Open Asset Import Library. * Open Asset Import Library.
* *
* Create an object of this class and call ReadFile() to import a file. * 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. * 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 * 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 * read-only. The imported data will be destroyed along with the Importer
* object. If the import fails, 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 * case you can retrieve a human-readable error description be calling
* GetErrorString(). You can call ReadFile() multiple times with a single Importer * GetErrorString(). You can call ReadFile() multiple times with a single Importer
* instance. Actually, constructing Importer objects involves quite many * instance. Actually, constructing Importer objects involves quite many
* allocations and may take some time, so it's better to reuse them as often as * allocations and may take some time, so it's better to reuse them as often as
* possible. * possible.
* *
* If you need the Importer to do custom file handling to access the files, * 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 * implement IOSystem and IOStream and supply an instance of your custom
* IOSystem implementation by calling SetIOHandler() before calling ReadFile(). * IOSystem implementation by calling SetIOHandler() before calling ReadFile().
* If you do not assign a custion IO handler, a default handler using the * If you do not assign a custion IO handler, a default handler using the
* standard C++ IO logic will be used. * standard C++ IO logic will be used.
* *
* @note One Importer instance is not thread-safe. If you use multiple * @note One Importer instance is not thread-safe. If you use multiple
@ -118,8 +118,8 @@ class ASSIMP_API Importer {
public: public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Constructor. Creates an empty importer object. /** Constructor. Creates an empty importer object.
* *
* Call ReadFile() to start the import process. The configuration * Call ReadFile() to start the import process. The configuration
* property table is initially empty. * property table is initially empty.
*/ */
@ -127,7 +127,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Copy constructor. /** Copy constructor.
* *
* This copies the configuration properties of another Importer. * This copies the configuration properties of another Importer.
* If this Importer owns a scene it won't be copied. * If this Importer owns a scene it won't be copied.
* Call ReadFile() to start the import process. * Call ReadFile() to start the import process.
@ -136,7 +136,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Destructor. The object kept ownership of the imported data, /** Destructor. The object kept ownership of the imported data,
* which now will be destroyed along with the object. * which now will be destroyed along with the object.
*/ */
~Importer(); ~Importer();
@ -144,7 +144,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Registers a new loader. /** Registers a new loader.
* *
* @param pImp Importer to be added. The Importer instance takes * @param pImp Importer to be added. The Importer instance takes
* ownership of the pointer, so it will be automatically deleted * ownership of the pointer, so it will be automatically deleted
* with the Importer instance. * with the Importer instance.
* @return AI_SUCCESS if the loader has been added. The registration * @return AI_SUCCESS if the loader has been added. The registration
@ -166,11 +166,11 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Registers a new post-process step. /** Registers a new post-process step.
* *
* At the moment, there's a small limitation: new post processing * At the moment, there's a small limitation: new post processing
* steps are added to end of the list, or in other words, executed * steps are added to end of the list, or in other words, executed
* last, after all built-in steps. * last, after all built-in steps.
* @param pImp Post-process step to be added. The Importer instance * @param pImp Post-process step to be added. The Importer instance
* takes ownership of the pointer, so it will be automatically * takes ownership of the pointer, so it will be automatically
* deleted with the Importer instance. * deleted with the Importer instance.
* @return AI_SUCCESS if the step has been added correctly. * @return AI_SUCCESS if the step has been added correctly.
*/ */
@ -179,7 +179,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Unregisters a post-process step. /** Unregisters a post-process step.
* *
* @param pImp Step to be unregistered. * @param pImp Step to be unregistered.
* @return AI_SUCCESS if the step has been removed. The function * @return AI_SUCCESS if the step has been removed. The function
* fails if the step is currently in use (this could happen * fails if the step is currently in use (this could happen
* if the #Importer instance is used by more than one thread) or * if the #Importer instance is used by more than one thread) or
@ -197,7 +197,7 @@ public:
* @return true if the property was set before. The new value replaces * @return true if the property was set before. The new value replaces
* the previous value in this case. * the previous value in this case.
* @note Property of different types (float, int, string ..) are kept * @note Property of different types (float, int, string ..) are kept
* on different stacks, so calling SetPropertyInteger() for a * on different stacks, so calling SetPropertyInteger() for a
* floating-point property has no effect - the loader will call * floating-point property has no effect - the loader will call
* GetPropertyFloat() to read the property, but it won't be there. * GetPropertyFloat() to read the property, but it won't be there.
*/ */
@ -237,15 +237,15 @@ public:
* @param szName Name of the property. All supported properties * @param szName Name of the property. All supported properties
* are defined in the aiConfig.g header (all constants share the * are defined in the aiConfig.g header (all constants share the
* prefix AI_CONFIG_XXX). * prefix AI_CONFIG_XXX).
* @param iErrorReturn Value that is returned if the property * @param iErrorReturn Value that is returned if the property
* is not found. * is not found.
* @return Current value of the property * @return Current value of the property
* @note Property of different types (float, int, string ..) are kept * @note Property of different types (float, int, string ..) are kept
* on different lists, so calling SetPropertyInteger() for a * on different lists, so calling SetPropertyInteger() for a
* floating-point property has no effect - the loader will call * floating-point property has no effect - the loader will call
* GetPropertyFloat() to read the property, but it won't be there. * GetPropertyFloat() to read the property, but it won't be there.
*/ */
int GetPropertyInteger(const char* szName, int GetPropertyInteger(const char* szName,
int iErrorReturn = 0xffffffff) const; int iErrorReturn = 0xffffffff) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -263,7 +263,7 @@ public:
/** Get a floating-point configuration property /** Get a floating-point configuration property
* @see GetPropertyInteger() * @see GetPropertyInteger()
*/ */
float GetPropertyFloat(const char* szName, float GetPropertyFloat(const char* szName,
float fErrorReturn = 10e10f) const; float fErrorReturn = 10e10f) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -286,18 +286,18 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Supplies a custom IO handler to the importer to use to open and /** Supplies a custom IO handler to the importer to use to open and
* access files. If you need the importer to use custion IO logic to * access files. If you need the importer to use custion IO logic to
* access the files, you need to provide a custom implementation of * access the files, you need to provide a custom implementation of
* IOSystem and IOFile to the importer. Then create an instance of * IOSystem and IOFile to the importer. Then create an instance of
* your custion IOSystem implementation and supply it by this function. * your custion IOSystem implementation and supply it by this function.
* *
* The Importer takes ownership of the object and will destroy it * The Importer takes ownership of the object and will destroy it
* afterwards. The previously assigned handler will be deleted. * afterwards. The previously assigned handler will be deleted.
* Pass NULL to take again ownership of your IOSystem and reset Assimp * Pass NULL to take again ownership of your IOSystem and reset Assimp
* to use its default implementation. * to use its default implementation.
* *
* @param pIOHandler The IO handler to be used in all file accesses * @param pIOHandler The IO handler to be used in all file accesses
* of the Importer. * of the Importer.
*/ */
void SetIOHandler( IOSystem* pIOHandler); void SetIOHandler( IOSystem* pIOHandler);
@ -312,28 +312,28 @@ public:
IOSystem* GetIOHandler() const; IOSystem* GetIOHandler() const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Checks whether a default IO handler is active /** Checks whether a default IO handler is active
* A default handler is active as long the application doesn't * A default handler is active as long the application doesn't
* supply its own custom IO handler via #SetIOHandler(). * supply its own custom IO handler via #SetIOHandler().
* @return true by default * @return true by default
*/ */
bool IsDefaultIOHandler() const; bool IsDefaultIOHandler() const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Supplies a custom progress handler to the importer. This /** Supplies a custom progress handler to the importer. This
* interface exposes a #Update() callback, which is called * interface exposes a #Update() callback, which is called
* more or less periodically (please don't sue us if it * more or less periodically (please don't sue us if it
* isn't as periodically as you'd like it to have ...). * isn't as periodically as you'd like it to have ...).
* This can be used to implement progress bars and loading * This can be used to implement progress bars and loading
* timeouts. * timeouts.
* @param pHandler Progress callback interface. Pass NULL to * @param pHandler Progress callback interface. Pass NULL to
* disable progress reporting. * disable progress reporting.
* @note Progress handlers can be used to abort the loading * @note Progress handlers can be used to abort the loading
* at almost any time.*/ * at almost any time.*/
void SetProgressHandler ( ProgressHandler* pHandler ); void SetProgressHandler ( ProgressHandler* pHandler );
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Retrieves the progress handler that is currently set. /** Retrieves the progress handler that is currently set.
* You can use #IsDefaultProgressHandler() to check whether the returned * You can use #IsDefaultProgressHandler() to check whether the returned
* interface is the default handler provided by ASSIMP. The default * interface is the default handler provided by ASSIMP. The default
* handler is active as long the application doesn't supply its own * handler is active as long the application doesn't supply its own
@ -343,8 +343,8 @@ public:
ProgressHandler* GetProgressHandler() const; ProgressHandler* GetProgressHandler() const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Checks whether a default progress handler is active /** Checks whether a default progress handler is active
* A default handler is active as long the application doesn't * A default handler is active as long the application doesn't
* supply its own custom progress handler via #SetProgressHandler(). * supply its own custom progress handler via #SetProgressHandler().
* @return true by default * @return true by default
*/ */
@ -356,7 +356,7 @@ public:
* *
* Some flags are mutually exclusive, others are probably * Some flags are mutually exclusive, others are probably
* not available because your excluded them from your * not available because your excluded them from your
* Assimp builds. Calling this function is recommended if * Assimp builds. Calling this function is recommended if
* you're unsure. * you're unsure.
* *
* @param pFlags Bitwise combination of the aiPostProcess flags. * @param pFlags Bitwise combination of the aiPostProcess flags.
@ -365,17 +365,17 @@ public:
bool ValidateFlags(unsigned int pFlags) const; bool ValidateFlags(unsigned int pFlags) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Reads the given file and returns its contents if successful. /** Reads the given file and returns its contents if successful.
* *
* If the call succeeds, the contents of the file are returned as a * If the call succeeds, the contents of the file are returned as a
* pointer to an aiScene object. The returned data is intended to be * pointer to an aiScene object. The returned data is intended to be
* read-only, the importer object keeps ownership of the data and will * read-only, the importer object keeps ownership of the data and will
* destroy it upon destruction. If the import fails, NULL is returned. * destroy it upon destruction. If the import fails, NULL is returned.
* A human-readable error description can be retrieved by calling * A human-readable error description can be retrieved by calling
* GetErrorString(). The previous scene will be deleted during this call. * GetErrorString(). The previous scene will be deleted during this call.
* @param pFile Path and filename to the file to be imported. * @param pFile Path and filename to the file to be imported.
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. If you wish to inspect the imported * #aiPostProcessSteps flags. If you wish to inspect the imported
* scene first in order to fine-tune your post-processing setup, * scene first in order to fine-tune your post-processing setup,
* consider to use #ApplyPostProcessing(). * consider to use #ApplyPostProcessing().
@ -384,32 +384,32 @@ public:
* instance. Use GetOrphanedScene() to take ownership of it. * instance. Use GetOrphanedScene() to take ownership of it.
* *
* @note Assimp is able to determine the file format of a file * @note Assimp is able to determine the file format of a file
* automatically. * automatically.
*/ */
const aiScene* ReadFile( const aiScene* ReadFile(
const char* pFile, const char* pFile,
unsigned int pFlags); unsigned int pFlags);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Reads the given file from a memory buffer and returns its /** Reads the given file from a memory buffer and returns its
* contents if successful. * contents if successful.
* *
* If the call succeeds, the contents of the file are returned as a * If the call succeeds, the contents of the file are returned as a
* pointer to an aiScene object. The returned data is intended to be * pointer to an aiScene object. The returned data is intended to be
* read-only, the importer object keeps ownership of the data and will * read-only, the importer object keeps ownership of the data and will
* destroy it upon destruction. If the import fails, NULL is returned. * destroy it upon destruction. If the import fails, NULL is returned.
* A human-readable error description can be retrieved by calling * A human-readable error description can be retrieved by calling
* GetErrorString(). The previous scene will be deleted during this call. * GetErrorString(). The previous scene will be deleted during this call.
* Calling this method doesn't affect the active IOSystem. * Calling this method doesn't affect the active IOSystem.
* @param pBuffer Pointer to the file data * @param pBuffer Pointer to the file data
* @param pLength Length of pBuffer, in bytes * @param pLength Length of pBuffer, in bytes
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. If you wish to inspect the imported * #aiPostProcessSteps flags. If you wish to inspect the imported
* scene first in order to fine-tune your post-processing setup, * scene first in order to fine-tune your post-processing setup,
* consider to use #ApplyPostProcessing(). * consider to use #ApplyPostProcessing().
* @param pHint An additional hint to the library. If this is a non * @param pHint An additional hint to the library. If this is a non
* empty string, the library looks for a loader to support * empty string, the library looks for a loader to support
* the file extension specified by pHint and passes the file to * the file extension specified by pHint and passes the file to
* the first matching loader. If this loader is unable to completely * the first matching loader. If this loader is unable to completely
* the request, the library continues and tries to determine the * the request, the library continues and tries to determine the
@ -420,14 +420,14 @@ public:
* instance. Use GetOrphanedScene() to take ownership of it. * instance. Use GetOrphanedScene() to take ownership of it.
* *
* @note This is a straightforward way to decode models from memory * @note This is a straightforward way to decode models from memory
* buffers, but it doesn't handle model formats that spread their * buffers, but it doesn't handle model formats that spread their
* data across multiple files or even directories. Examples include * data across multiple files or even directories. Examples include
* OBJ or MD3, which outsource parts of their material info into * OBJ or MD3, which outsource parts of their material info into
* external scripts. If you need full functionality, provide * external scripts. If you need full functionality, provide
* a custom IOSystem to make Assimp find these files and use * a custom IOSystem to make Assimp find these files and use
* the regular ReadFile() API. * the regular ReadFile() API.
*/ */
const aiScene* ReadFileFromMemory( const aiScene* ReadFileFromMemory(
const void* pBuffer, const void* pBuffer,
size_t pLength, size_t pLength,
unsigned int pFlags, unsigned int pFlags,
@ -439,7 +439,7 @@ public:
* This is strictly equivalent to calling #ReadFile() with the same * This is strictly equivalent to calling #ReadFile() with the same
* flags. However, you can use this separate function to inspect * flags. However, you can use this separate function to inspect
* the imported scene first to fine-tune your post-processing setup. * the imported scene first to fine-tune your post-processing setup.
* @param pFlags Provide a bitwise combination of the * @param pFlags Provide a bitwise combination of the
* #aiPostProcessSteps flags. * #aiPostProcessSteps flags.
* @return A pointer to the post-processed data. This is still the * @return A pointer to the post-processed data. This is still the
* same as the pointer returned by #ReadFile(). However, if * same as the pointer returned by #ReadFile(). However, if
@ -454,31 +454,31 @@ public:
const aiScene* ApplyPostProcessing(unsigned int pFlags); const aiScene* ApplyPostProcessing(unsigned int pFlags);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Reads the given file and returns its contents if successful. /** @brief Reads the given file and returns its contents if successful.
* *
* This function is provided for backward compatibility. * This function is provided for backward compatibility.
* See the const char* version for detailled docs. * See the const char* version for detailled docs.
* @see ReadFile(const char*, pFlags) */ * @see ReadFile(const char*, pFlags) */
const aiScene* ReadFile( const aiScene* ReadFile(
const std::string& pFile, const std::string& pFile,
unsigned int pFlags); unsigned int pFlags);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Frees the current scene. /** Frees the current scene.
* *
* The function does nothing if no scene has previously been * The function does nothing if no scene has previously been
* read via ReadFile(). FreeScene() is called automatically by the * read via ReadFile(). FreeScene() is called automatically by the
* destructor and ReadFile() itself. */ * destructor and ReadFile() itself. */
void FreeScene( ); void FreeScene( );
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Returns an error description of an error that occurred in ReadFile(). /** Returns an error description of an error that occurred in ReadFile().
* *
* Returns an empty string if no error occurred. * Returns an empty string if no error occurred.
* @return A description of the last error, an empty string if no * @return A description of the last error, an empty string if no
* error occurred. The string is never NULL. * error occurred. The string is never NULL.
* *
* @note The returned function remains valid until one of the * @note The returned function remains valid until one of the
* following methods is called: #ReadFile(), #FreeScene(). */ * following methods is called: #ReadFile(), #FreeScene(). */
const char* GetErrorString() const; const char* GetErrorString() const;
@ -490,7 +490,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Returns the scene loaded by the last successful call to ReadFile() /** Returns the scene loaded by the last successful call to ReadFile()
* and releases the scene from the ownership of the Importer * and releases the scene from the ownership of the Importer
* instance. The application is now responsible for deleting the * instance. The application is now responsible for deleting the
* scene. Any further calls to GetScene() or GetOrphanedScene() * scene. Any further calls to GetScene() or GetOrphanedScene()
* will return NULL - until a new scene has been loaded via ReadFile(). * will return NULL - until a new scene has been loaded via ReadFile().
@ -536,7 +536,7 @@ public:
* mean that ASSIMP is able to load all files with this extension --- * mean that ASSIMP is able to load all files with this extension ---
* it simply means there is an importer loaded which claims to handle * it simply means there is an importer loaded which claims to handle
* files with this file extension. * files with this file extension.
* @param szOut String to receive the extension list. * @param szOut String to receive the extension list.
* Format of the list: "*.3ds;*.obj;*.dae". This is useful for * Format of the list: "*.3ds;*.obj;*.dae". This is useful for
* use with the WinAPI call GetOpenFileName(Ex). */ * use with the WinAPI call GetOpenFileName(Ex). */
void GetExtensionList(aiString& szOut) const; void GetExtensionList(aiString& szOut) const;
@ -601,14 +601,14 @@ public:
* in memory. * in memory.
* *
* This refers to the currently loaded file, see #ReadFile(). * This refers to the currently loaded file, see #ReadFile().
* @param in Data structure to be filled. * @param in Data structure to be filled.
* @note The returned memory statistics refer to the actual * @note The returned memory statistics refer to the actual
* size of the use data of the aiScene. Heap-related overhead * size of the use data of the aiScene. Heap-related overhead
* is (naturally) not included.*/ * is (naturally) not included.*/
void GetMemoryRequirements(aiMemoryInfo& in) const; void GetMemoryRequirements(aiMemoryInfo& in) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Enables "extra verbose" mode. /** Enables "extra verbose" mode.
* *
* 'Extra verbose' means the data structure is validated after *every* * 'Extra verbose' means the data structure is validated after *every*
* single post processing step to make sure everyone modifies the data * single post processing step to make sure everyone modifies the data
@ -631,7 +631,7 @@ protected:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// For compatibility, the interface of some functions taking a std::string was // For compatibility, the interface of some functions taking a std::string was
// changed to const char* to avoid crashes between binary incompatible STL // changed to const char* to avoid crashes between binary incompatible STL
// versions. This code her is inlined, so it shouldn't cause any problems. // versions. This code her is inlined, so it shouldn't cause any problems.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,16 +23,16 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -71,7 +71,7 @@ public:
/** @brief Overwrite this for your own output methods /** @brief Overwrite this for your own output methods
* *
* Log messages *may* consist of multiple lines and you shouldn't * Log messages *may* consist of multiple lines and you shouldn't
* expect a consistent formatting. If you want custom formatting * expect a consistent formatting. If you want custom formatting
* (e.g. generate HTML), supply a custom instance of Logger to * (e.g. generate HTML), supply a custom instance of Logger to
* #DefaultLogger:set(). Usually you can *expect* that a log message * #DefaultLogger:set(). Usually you can *expect* that a log message
* is exactly one line and terminated with a single \n character. * is exactly one line and terminated with a single \n character.
@ -82,7 +82,7 @@ public:
/** @brief Creates a default log stream /** @brief Creates a default log stream
* @param streams Type of the default stream * @param streams Type of the default stream
* @param name For aiDefaultLogStream_FILE: name of the output file * @param name For aiDefaultLogStream_FILE: name of the output file
* @param io For aiDefaultLogStream_FILE: IOSystem to be used to open the output * @param io For aiDefaultLogStream_FILE: IOSystem to be used to open the output
* file. Pass NULL for the default implementation. * file. Pass NULL for the default implementation.
* @return New LogStream instance. */ * @return New LogStream instance. */
static LogStream* createDefaultStream(aiDefaultLogStream stream, static LogStream* createDefaultStream(aiDefaultLogStream stream,

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,23 +23,23 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
*/ */
/** @file Logger.hpp /** @file Logger.hpp
* @brief Abstract base class 'Logger', base of the logging system. * @brief Abstract base class 'Logger', base of the logging system.
*/ */
#ifndef INCLUDED_AI_LOGGER_H #ifndef INCLUDED_AI_LOGGER_H
#define INCLUDED_AI_LOGGER_H #define INCLUDED_AI_LOGGER_H
@ -53,7 +53,7 @@ class LogStream;
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** @brief CPP-API: Abstract interface for logger implementations. /** @brief CPP-API: Abstract interface for logger implementations.
* Assimp provides a default implementation and uses it for almost all * Assimp provides a default implementation and uses it for almost all
* logging stuff ('DefaultLogger'). This class defines just basic logging * logging stuff ('DefaultLogger'). This class defines just basic logging
* behaviour and is not of interest for you. Instead, take a look at #DefaultLogger. */ * behaviour and is not of interest for you. Instead, take a look at #DefaultLogger. */
class ASSIMP_API Logger class ASSIMP_API Logger
@ -139,11 +139,11 @@ public:
* messages are dispatched to the stream. Provide a bitwise * messages are dispatched to the stream. Provide a bitwise
* combination of the ErrorSeverity flags. * combination of the ErrorSeverity flags.
* @return true if the stream has been attached, false otherwise.*/ * @return true if the stream has been attached, false otherwise.*/
virtual bool attachStream(LogStream *pStream, virtual bool attachStream(LogStream *pStream,
unsigned int severity = Debugging | Err | Warn | Info) = 0; unsigned int severity = Debugging | Err | Warn | Info) = 0;
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
/** @brief Detach a still attached stream from the logger (or /** @brief Detach a still attached stream from the logger (or
* modify the filter flags bits) * modify the filter flags bits)
* @param pStream Log-stream instance for detaching * @param pStream Log-stream instance for detaching
* @param severity Provide a bitwise combination of the ErrorSeverity * @param severity Provide a bitwise combination of the ErrorSeverity
@ -151,7 +151,7 @@ public:
* if the result is 0 the stream is detached from the Logger and * if the result is 0 the stream is detached from the Logger and
* the caller retakes the possession of the stream. * the caller retakes the possession of the stream.
* @return true if the stream has been detached, false otherwise.*/ * @return true if the stream has been detached, false otherwise.*/
virtual bool detatchStream(LogStream *pStream, virtual bool detatchStream(LogStream *pStream,
unsigned int severity = Debugging | Err | Warn | Info) = 0; unsigned int severity = Debugging | Err | Warn | Info) = 0;
protected: protected:

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,16 +23,16 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -50,30 +50,30 @@ namespace Assimp {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief CPP-API: Empty logging implementation. /** @brief CPP-API: Empty logging implementation.
* *
* Does nothing! Used by default if the application hasn't requested a * Does nothing! Used by default if the application hasn't requested a
* custom logger via #DefaultLogger::set() or #DefaultLogger::create(); */ * custom logger via #DefaultLogger::set() or #DefaultLogger::create(); */
class ASSIMP_API NullLogger class ASSIMP_API NullLogger
: public Logger { : public Logger {
public: public:
/** @brief Logs a debug message */ /** @brief Logs a debug message */
void OnDebug(const char* message) { void OnDebug(const char* message) {
(void)message; //this avoids compiler warnings (void)message; //this avoids compiler warnings
} }
/** @brief Logs an info message */ /** @brief Logs an info message */
void OnInfo(const char* message) { void OnInfo(const char* message) {
(void)message; //this avoids compiler warnings (void)message; //this avoids compiler warnings
} }
/** @brief Logs a warning message */ /** @brief Logs a warning message */
void OnWarn(const char* message) { void OnWarn(const char* message) {
(void)message; //this avoids compiler warnings (void)message; //this avoids compiler warnings
} }
/** @brief Logs an error message */ /** @brief Logs an error message */
void OnError(const char* message) { void OnError(const char* message) {
(void)message; //this avoids compiler warnings (void)message; //this avoids compiler warnings
} }

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,16 +23,16 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -49,7 +49,7 @@ namespace Assimp {
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
/** @brief CPP-API: Abstract interface for custom progress report receivers. /** @brief CPP-API: Abstract interface for custom progress report receivers.
* *
* Each #Importer instance maintains its own #ProgressHandler. The default * Each #Importer instance maintains its own #ProgressHandler. The default
* implementation provided by Assimp doesn't do anything at all. */ * implementation provided by Assimp doesn't do anything at all. */
class ASSIMP_API ProgressHandler class ASSIMP_API ProgressHandler
#ifndef SWIG #ifndef SWIG
@ -70,10 +70,10 @@ public:
* @param percentage An estimate of the current loading progress, * @param percentage An estimate of the current loading progress,
* in percent. Or -1.f if such an estimate is not available. * in percent. Or -1.f if such an estimate is not available.
* *
* There are restriction on what you may do from within your * There are restriction on what you may do from within your
* implementation of this method: no exceptions may be thrown and no * implementation of this method: no exceptions may be thrown and no
* non-const #Importer methods may be called. It is * non-const #Importer methods may be called. It is
* not generally possible to predict the number of callbacks * not generally possible to predict the number of callbacks
* fired during a single import. * fired during a single import.
* *
* @return Return false to abort loading at the next possible * @return Return false to abort loading at the next possible
@ -115,7 +115,7 @@ public:
Update( f * 0.5f + 0.5f ); Update( f * 0.5f + 0.5f );
} }
}; // !class ProgressHandler }; // !class ProgressHandler
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
} // Namespace Assimp } // Namespace Assimp

View File

@ -3,7 +3,7 @@
#ifndef AI_DEBUG_H_INC #ifndef AI_DEBUG_H_INC
#define AI_DEBUG_H_INC #define AI_DEBUG_H_INC
#ifdef ASSIMP_BUILD_DEBUG #ifdef ASSIMP_BUILD_DEBUG
# include <assert.h> # include <assert.h>
# define ai_assert(expression) assert(expression) # define ai_assert(expression) assert(expression)
#else #else

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -58,10 +58,10 @@ extern "C" {
struct aiVectorKey struct aiVectorKey
{ {
/** The time of this key */ /** The time of this key */
double mTime; double mTime;
/** The value of this key */ /** The value of this key */
C_STRUCT aiVector3D mValue; C_STRUCT aiVector3D mValue;
#ifdef __cplusplus #ifdef __cplusplus
@ -96,15 +96,15 @@ struct aiVectorKey
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** A time-value pair specifying a rotation for the given time. /** A time-value pair specifying a rotation for the given time.
* Rotations are expressed with quaternions. */ * Rotations are expressed with quaternions. */
struct aiQuatKey struct aiQuatKey
{ {
/** The time of this key */ /** The time of this key */
double mTime; double mTime;
/** The value of this key */ /** The value of this key */
C_STRUCT aiQuaternion mValue; C_STRUCT aiQuaternion mValue;
#ifdef __cplusplus #ifdef __cplusplus
aiQuatKey(){ aiQuatKey(){
@ -138,12 +138,12 @@ struct aiQuatKey
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Binds a anim mesh to a specific point in time. */ /** Binds a anim mesh to a specific point in time. */
struct aiMeshKey struct aiMeshKey
{ {
/** The time of this key */ /** The time of this key */
double mTime; double mTime;
/** Index into the aiMesh::mAnimMeshes array of the /** Index into the aiMesh::mAnimMeshes array of the
* mesh coresponding to the #aiMeshAnim hosting this * mesh coresponding to the #aiMeshAnim hosting this
* key frame. The referenced anim mesh is evaluated * key frame. The referenced anim mesh is evaluated
* according to the rules defined in the docs for #aiAnimMesh.*/ * according to the rules defined in the docs for #aiAnimMesh.*/
@ -183,12 +183,12 @@ struct aiMeshKey
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Defines how an animation channel behaves outside the defined time /** Defines how an animation channel behaves outside the defined time
* range. This corresponds to aiNodeAnim::mPreState and * range. This corresponds to aiNodeAnim::mPreState and
* aiNodeAnim::mPostState.*/ * aiNodeAnim::mPostState.*/
enum aiAnimBehaviour enum aiAnimBehaviour
{ {
/** The value from the default node transformation is taken*/ /** The value from the default node transformation is taken*/
aiAnimBehaviour_DEFAULT = 0x0, aiAnimBehaviour_DEFAULT = 0x0,
/** The nearest key value is used without interpolation */ /** The nearest key value is used without interpolation */
aiAnimBehaviour_CONSTANT = 0x1, aiAnimBehaviour_CONSTANT = 0x1,
@ -213,9 +213,9 @@ enum aiAnimBehaviour
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Describes the animation of a single node. The name specifies the /** Describes the animation of a single node. The name specifies the
* bone/node which is affected by this animation channel. The keyframes * bone/node which is affected by this animation channel. The keyframes
* are given in three separate series of values, one each for position, * are given in three separate series of values, one each for position,
* rotation and scaling. The transformation matrix computed from these * rotation and scaling. The transformation matrix computed from these
* values replaces the node's original transformation matrix at a * values replaces the node's original transformation matrix at a
* specific time. * specific time.
@ -225,18 +225,18 @@ enum aiAnimBehaviour
* *
* @note All keys are returned in their correct, chronological order. * @note All keys are returned in their correct, chronological order.
* Duplicate keys don't pass the validation step. Most likely there * Duplicate keys don't pass the validation step. Most likely there
* will be no negative time values, but they are not forbidden also ( so * will be no negative time values, but they are not forbidden also ( so
* implementations need to cope with them! ) */ * implementations need to cope with them! ) */
struct aiNodeAnim struct aiNodeAnim
{ {
/** The name of the node affected by this animation. The node /** The name of the node affected by this animation. The node
* must exist and it must be unique.*/ * must exist and it must be unique.*/
C_STRUCT aiString mNodeName; C_STRUCT aiString mNodeName;
/** The number of position keys */ /** The number of position keys */
unsigned int mNumPositionKeys; unsigned int mNumPositionKeys;
/** The position keys of this animation channel. Positions are /** The position keys of this animation channel. Positions are
* specified as 3D vector. The array is mNumPositionKeys in size. * specified as 3D vector. The array is mNumPositionKeys in size.
* *
* If there are position keys, there will also be at least one * If there are position keys, there will also be at least one
@ -246,8 +246,8 @@ struct aiNodeAnim
/** The number of rotation keys */ /** The number of rotation keys */
unsigned int mNumRotationKeys; unsigned int mNumRotationKeys;
/** The rotation keys of this animation channel. Rotations are /** The rotation keys of this animation channel. Rotations are
* given as quaternions, which are 4D vectors. The array is * given as quaternions, which are 4D vectors. The array is
* mNumRotationKeys in size. * mNumRotationKeys in size.
* *
* If there are rotation keys, there will also be at least one * If there are rotation keys, there will also be at least one
@ -258,7 +258,7 @@ struct aiNodeAnim
/** The number of scaling keys */ /** The number of scaling keys */
unsigned int mNumScalingKeys; unsigned int mNumScalingKeys;
/** The scaling keys of this animation channel. Scalings are /** The scaling keys of this animation channel. Scalings are
* specified as 3D vector. The array is mNumScalingKeys in size. * specified as 3D vector. The array is mNumScalingKeys in size.
* *
* If there are scaling keys, there will also be at least one * If there are scaling keys, there will also be at least one
@ -273,7 +273,7 @@ struct aiNodeAnim
* transformation matrix of the affected node is used).*/ * transformation matrix of the affected node is used).*/
C_ENUM aiAnimBehaviour mPreState; C_ENUM aiAnimBehaviour mPreState;
/** Defines how the animation behaves after the last /** Defines how the animation behaves after the last
* key was processed. * key was processed.
* *
* The default value is aiAnimBehaviour_DEFAULT (the original * The default value is aiAnimBehaviour_DEFAULT (the original
@ -283,9 +283,9 @@ struct aiNodeAnim
#ifdef __cplusplus #ifdef __cplusplus
aiNodeAnim() aiNodeAnim()
{ {
mNumPositionKeys = 0; mPositionKeys = NULL; mNumPositionKeys = 0; mPositionKeys = NULL;
mNumRotationKeys = 0; mRotationKeys = NULL; mNumRotationKeys = 0; mRotationKeys = NULL;
mNumScalingKeys = 0; mScalingKeys = NULL; mNumScalingKeys = 0; mScalingKeys = NULL;
mPreState = mPostState = aiAnimBehaviour_DEFAULT; mPreState = mPostState = aiAnimBehaviour_DEFAULT;
} }
@ -302,7 +302,7 @@ struct aiNodeAnim
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Describes vertex-based animations for a single mesh or a group of /** Describes vertex-based animations for a single mesh or a group of
* meshes. Meshes carry the animation data for each frame in their * meshes. Meshes carry the animation data for each frame in their
* aiMesh::mAnimMeshes array. The purpose of aiMeshAnim is to * aiMesh::mAnimMeshes array. The purpose of aiMeshAnim is to
* define keyframes linking each mesh attachment to a particular * define keyframes linking each mesh attachment to a particular
* point in time. */ * point in time. */
struct aiMeshAnim struct aiMeshAnim
@ -335,12 +335,12 @@ struct aiMeshAnim
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** An animation consists of keyframe data for a number of nodes. For /** An animation consists of keyframe data for a number of nodes. For
* each node affected by the animation a separate series of data is given.*/ * each node affected by the animation a separate series of data is given.*/
struct aiAnimation struct aiAnimation
{ {
/** The name of the animation. If the modeling package this data was /** The name of the animation. If the modeling package this data was
* exported from does support only a single animation channel, this * exported from does support only a single animation channel, this
* name is usually empty (length is zero). */ * name is usually empty (length is zero). */
C_STRUCT aiString mName; C_STRUCT aiString mName;
@ -354,7 +354,7 @@ struct aiAnimation
* a single node. */ * a single node. */
unsigned int mNumChannels; unsigned int mNumChannels;
/** The node animation channels. Each channel affects a single node. /** The node animation channels. Each channel affects a single node.
* The array is mNumChannels in size. */ * The array is mNumChannels in size. */
C_STRUCT aiNodeAnim** mChannels; C_STRUCT aiNodeAnim** mChannels;
@ -363,7 +363,7 @@ struct aiAnimation
* a single mesh and defines vertex-based animation. */ * a single mesh and defines vertex-based animation. */
unsigned int mNumMeshChannels; unsigned int mNumMeshChannels;
/** The mesh animation channels. Each channel affects a single mesh. /** The mesh animation channels. Each channel affects a single mesh.
* The array is mNumMeshChannels in size. */ * The array is mNumMeshChannels in size. */
C_STRUCT aiMeshAnim** mMeshChannels; C_STRUCT aiMeshAnim** mMeshChannels;
@ -412,8 +412,8 @@ namespace Assimp {
* The type of interpolation is choosen automatically depending on the * The type of interpolation is choosen automatically depending on the
* types of the arguments. */ * types of the arguments. */
template <typename T> template <typename T>
struct Interpolator struct Interpolator
{ {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
/** @brief Get the result of the interpolation between a,b. /** @brief Get the result of the interpolation between a,b.
* *
@ -428,8 +428,8 @@ struct Interpolator
//! @cond Never //! @cond Never
template <> template <>
struct Interpolator <aiQuaternion> { struct Interpolator <aiQuaternion> {
void operator () (aiQuaternion& out,const aiQuaternion& a, void operator () (aiQuaternion& out,const aiQuaternion& a,
const aiQuaternion& b, float d) const const aiQuaternion& b, float d) const
{ {
aiQuaternion::Interpolate(out,a,b,d); aiQuaternion::Interpolate(out,a,b,d);
@ -437,8 +437,8 @@ struct Interpolator <aiQuaternion> {
}; // ! Interpolator <aiQuaternion> }; // ! Interpolator <aiQuaternion>
template <> template <>
struct Interpolator <unsigned int> { struct Interpolator <unsigned int> {
void operator () (unsigned int& out,unsigned int a, void operator () (unsigned int& out,unsigned int a,
unsigned int b, float d) const unsigned int b, float d) const
{ {
out = d>0.5f ? b : a; out = d>0.5f ? b : a;
@ -446,9 +446,9 @@ struct Interpolator <unsigned int> {
}; // ! Interpolator <aiQuaternion> }; // ! Interpolator <aiQuaternion>
template <> template <>
struct Interpolator <aiVectorKey> { struct Interpolator <aiVectorKey> {
void operator () (aiVector3D& out,const aiVectorKey& a, void operator () (aiVector3D& out,const aiVectorKey& a,
const aiVectorKey& b, float d) const const aiVectorKey& b, float d) const
{ {
Interpolator<aiVector3D> ipl; Interpolator<aiVector3D> ipl;
ipl(out,a.mValue,b.mValue,d); ipl(out,a.mValue,b.mValue,d);

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -53,16 +53,16 @@ extern "C" {
#endif #endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Helper structure to describe a virtual camera. /** Helper structure to describe a virtual camera.
* *
* Cameras have a representation in the node graph and can be animated. * Cameras have a representation in the node graph and can be animated.
* An important aspect is that the camera itself is also part of the * An important aspect is that the camera itself is also part of the
* scenegraph. This means, any values such as the look-at vector are not * scenegraph. This means, any values such as the look-at vector are not
* *absolute*, they're <b>relative</b> to the coordinate system defined * *absolute*, they're <b>relative</b> to the coordinate system defined
* by the node which corresponds to the camera. This allows for camera * by the node which corresponds to the camera. This allows for camera
* animations. For static cameras parameters like the 'look-at' or 'up' vectors * animations. For static cameras parameters like the 'look-at' or 'up' vectors
* are usually specified directly in aiCamera, but beware, they could also * are usually specified directly in aiCamera, but beware, they could also
* be encoded in the node transformation. The following (pseudo)code sample * be encoded in the node transformation. The following (pseudo)code sample
* shows how to do it: <br><br> * shows how to do it: <br><br>
* @code * @code
* // Get the camera matrix for a camera at a specific time * // Get the camera matrix for a camera at a specific time
@ -93,7 +93,7 @@ extern "C" {
* called "<camName>.Target". However this is just additional information * called "<camName>.Target". However this is just additional information
* then the transformation tracks of the camera main node make the * then the transformation tracks of the camera main node make the
* camera already look in the right direction. * camera already look in the right direction.
* *
*/ */
struct aiCamera struct aiCamera
{ {
@ -134,7 +134,7 @@ struct aiCamera
C_STRUCT aiVector3D mLookAt; C_STRUCT aiVector3D mLookAt;
/** Half horizontal field of view angle, in radians. /** Half horizontal field of view angle, in radians.
* *
* The field of view angle is the angle between the center * The field of view angle is the angle between the center
* line of the screen and the left or right border. * line of the screen and the left or right border.
@ -183,7 +183,7 @@ struct aiCamera
/** @brief Get a *right-handed* camera matrix from me /** @brief Get a *right-handed* camera matrix from me
* @param out Camera matrix to be filled * @param out Camera matrix to be filled
*/ */
void GetCameraMatrix (aiMatrix4x4& out) const void GetCameraMatrix (aiMatrix4x4& out) const
{ {
/** todo: test ... should work, but i'm not absolutely sure */ /** todo: test ... should work, but i'm not absolutely sure */
@ -199,7 +199,7 @@ struct aiCamera
out.a1 = xaxis.x; out.a1 = xaxis.x;
out.a2 = xaxis.y; out.a2 = xaxis.y;
out.a3 = xaxis.z; out.a3 = xaxis.z;
out.b1 = yaxis.x; out.b1 = yaxis.x;
out.b2 = yaxis.y; out.b2 = yaxis.y;
out.b3 = yaxis.z; out.b3 = yaxis.z;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2011, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ contributors may be used to endorse or promote products
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -57,22 +57,22 @@ struct aiScene; // aiScene.h
struct aiFileIO; // aiFileIO.h struct aiFileIO; // aiFileIO.h
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Describes an file format which Assimp can export to. Use #aiGetExportFormatCount() to /** Describes an file format which Assimp can export to. Use #aiGetExportFormatCount() to
* learn how many export formats the current Assimp build supports and #aiGetExportFormatDescription() * learn how many export formats the current Assimp build supports and #aiGetExportFormatDescription()
* to retrieve a description of an export format option. * to retrieve a description of an export format option.
*/ */
struct aiExportFormatDesc struct aiExportFormatDesc
{ {
/// a short string ID to uniquely identify the export format. Use this ID string to /// a short string ID to uniquely identify the export format. Use this ID string to
/// specify which file format you want to export to when calling #aiExportScene(). /// specify which file format you want to export to when calling #aiExportScene().
/// Example: "dae" or "obj" /// Example: "dae" or "obj"
const char* id; const char* id;
/// A short description of the file format to present to users. Useful if you want /// A short description of the file format to present to users. Useful if you want
/// to allow the user to select an export format. /// to allow the user to select an export format.
const char* description; const char* description;
/// Recommended file extension for the exported file in lower case. /// Recommended file extension for the exported file in lower case.
const char* fileExtension; const char* fileExtension;
}; };
@ -86,7 +86,7 @@ ASSIMP_API size_t aiGetExportFormatCount(void);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Returns a description of the nth export file format. Use #aiGetExportFormatCount() /** Returns a description of the nth export file format. Use #aiGetExportFormatCount()
* to learn how many export formats are supported. * to learn how many export formats are supported.
* @param pIndex Index of the export format to retrieve information for. Valid range is * @param pIndex Index of the export format to retrieve information for. Valid range is
* 0 to #aiGetExportFormatCount() * 0 to #aiGetExportFormatCount()
* @return A description of that specific export format. NULL if pIndex is out of range. * @return A description of that specific export format. NULL if pIndex is out of range.
@ -96,14 +96,14 @@ ASSIMP_API const C_STRUCT aiExportFormatDesc* aiGetExportFormatDescription( size
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Create a modifiable copy of a scene. /** Create a modifiable copy of a scene.
* This is useful to import files via Assimp, change their topology and * This is useful to import files via Assimp, change their topology and
* export them again. Since the scene returned by the various importer functions * export them again. Since the scene returned by the various importer functions
* is const, a modifiable copy is needed. * is const, a modifiable copy is needed.
* @param pIn Valid scene to be copied * @param pIn Valid scene to be copied
* @param pOut Receives a modifyable copy of the scene. Use aiFreeScene() to * @param pOut Receives a modifyable copy of the scene. Use aiFreeScene() to
* delete it again. * delete it again.
*/ */
ASSIMP_API void aiCopyScene(const C_STRUCT aiScene* pIn, ASSIMP_API void aiCopyScene(const C_STRUCT aiScene* pIn,
C_STRUCT aiScene** pOut); C_STRUCT aiScene** pOut);
@ -119,16 +119,16 @@ ASSIMP_API void aiFreeScene(const C_STRUCT aiScene* pIn);
* should use a right-handed coordinate systems, face winding should be counter-clockwise * should use a right-handed coordinate systems, face winding should be counter-clockwise
* and the UV coordinate origin is assumed to be in the upper left. If your input data * and the UV coordinate origin is assumed to be in the upper left. If your input data
* uses different conventions, have a look at the last parameter. * uses different conventions, have a look at the last parameter.
* @param pFormatId ID string to specify to which format you want to export to. Use * @param pFormatId ID string to specify to which format you want to export to. Use
* aiGetExportFormatCount() / aiGetExportFormatDescription() to learn which export formats are available. * aiGetExportFormatCount() / aiGetExportFormatDescription() to learn which export formats are available.
* @param pFileName Output file to write * @param pFileName Output file to write
* @param pPreprocessing Accepts any choice of the #aiPostProcessSteps enumerated * @param pPreprocessing Accepts any choice of the #aiPostProcessSteps enumerated
* flags, but in reality only a subset of them makes sense here. Specifying * flags, but in reality only a subset of them makes sense here. Specifying
* 'preprocessing' flags is useful if the input scene does not conform to * 'preprocessing' flags is useful if the input scene does not conform to
* Assimp's default conventions as specified in the @link data Data Structures Page @endlink. * Assimp's default conventions as specified in the @link data Data Structures Page @endlink.
* In short, this means the geometry data should use a right-handed coordinate systems, face * In short, this means the geometry data should use a right-handed coordinate systems, face
* winding should be counter-clockwise and the UV coordinate origin is assumed to be in * winding should be counter-clockwise and the UV coordinate origin is assumed to be in
* the upper left. The #aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and * the upper left. The #aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and
* #aiProcess_FlipWindingOrder flags are used in the import side to allow users * #aiProcess_FlipWindingOrder flags are used in the import side to allow users
* to have those defaults automatically adapted to their conventions. Specifying those flags * to have those defaults automatically adapted to their conventions. Specifying those flags
* for exporting has the opposite effect, respectively. Some other of the * for exporting has the opposite effect, respectively. Some other of the
@ -136,30 +136,30 @@ ASSIMP_API void aiFreeScene(const C_STRUCT aiScene* pIn);
* to try out what their effect on the exported file is. Many formats impose * to try out what their effect on the exported file is. Many formats impose
* their own restrictions on the structure of the geometry stored therein, * their own restrictions on the structure of the geometry stored therein,
* so some preprocessing may have little or no effect at all, or may be * so some preprocessing may have little or no effect at all, or may be
* redundant as exporters would apply them anyhow. A good example * redundant as exporters would apply them anyhow. A good example
* is triangulation - whilst you can enforce it by specifying * is triangulation - whilst you can enforce it by specifying
* the #aiProcess_Triangulate flag, most export formats support only * the #aiProcess_Triangulate flag, most export formats support only
* triangulate data so they would run the step anyway. * triangulate data so they would run the step anyway.
* *
* If assimp detects that the input scene was directly taken from the importer side of * If assimp detects that the input scene was directly taken from the importer side of
* the library (i.e. not copied using aiCopyScene and potetially modified afterwards), * the library (i.e. not copied using aiCopyScene and potetially modified afterwards),
* any postprocessing steps already applied to the scene will not be applied again, unless * any postprocessing steps already applied to the scene will not be applied again, unless
* they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and * they show non-idempotent behaviour (#aiProcess_MakeLeftHanded, #aiProcess_FlipUVs and
* #aiProcess_FlipWindingOrder). * #aiProcess_FlipWindingOrder).
* @return a status code indicating the result of the export * @return a status code indicating the result of the export
* @note Use aiCopyScene() to get a modifiable copy of a previously * @note Use aiCopyScene() to get a modifiable copy of a previously
* imported scene. * imported scene.
*/ */
ASSIMP_API aiReturn aiExportScene( const C_STRUCT aiScene* pScene, ASSIMP_API aiReturn aiExportScene( const C_STRUCT aiScene* pScene,
const char* pFormatId, const char* pFormatId,
const char* pFileName, const char* pFileName,
unsigned int pPreprocessing); unsigned int pPreprocessing);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Exports the given scene to a chosen file format using custom IO logic supplied by you. /** Exports the given scene to a chosen file format using custom IO logic supplied by you.
* @param pScene The scene to export. Stays in possession of the caller, is not changed by the function. * @param pScene The scene to export. Stays in possession of the caller, is not changed by the function.
* @param pFormatId ID string to specify to which format you want to export to. Use * @param pFormatId ID string to specify to which format you want to export to. Use
* aiGetExportFormatCount() / aiGetExportFormatDescription() to learn which export formats are available. * aiGetExportFormatCount() / aiGetExportFormatDescription() to learn which export formats are available.
* @param pFileName Output file to write * @param pFileName Output file to write
* @param pIO custom IO implementation to be used. Use this if you use your own storage methods. * @param pIO custom IO implementation to be used. Use this if you use your own storage methods.
@ -171,16 +171,16 @@ ASSIMP_API aiReturn aiExportScene( const C_STRUCT aiScene* pScene,
* @note Use aiCopyScene() to get a modifiable copy of a previously * @note Use aiCopyScene() to get a modifiable copy of a previously
* imported scene. * imported scene.
*/ */
ASSIMP_API aiReturn aiExportSceneEx( const C_STRUCT aiScene* pScene, ASSIMP_API aiReturn aiExportSceneEx( const C_STRUCT aiScene* pScene,
const char* pFormatId, const char* pFormatId,
const char* pFileName, const char* pFileName,
C_STRUCT aiFileIO* pIO, C_STRUCT aiFileIO* pIO,
unsigned int pPreprocessing ); unsigned int pPreprocessing );
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Describes a blob of exported scene data. Use #aiExportSceneToBlob() to create a blob containing an /** Describes a blob of exported scene data. Use #aiExportSceneToBlob() to create a blob containing an
* exported scene. The memory referred by this structure is owned by Assimp. * exported scene. The memory referred by this structure is owned by Assimp.
* to free its resources. Don't try to free the memory on your side - it will crash for most build configurations * to free its resources. Don't try to free the memory on your side - it will crash for most build configurations
* due to conflicting heaps. * due to conflicting heaps.
* *
@ -188,12 +188,12 @@ ASSIMP_API aiReturn aiExportSceneEx( const C_STRUCT aiScene* pScene,
* This is used when exporters write more than one output file for a given #aiScene. See the remarks for * This is used when exporters write more than one output file for a given #aiScene. See the remarks for
* #aiExportDataBlob::name for more information. * #aiExportDataBlob::name for more information.
*/ */
struct aiExportDataBlob struct aiExportDataBlob
{ {
/// Size of the data in bytes /// Size of the data in bytes
size_t size; size_t size;
/// The data. /// The data.
void* data; void* data;
/** Name of the blob. An empty string always /** Name of the blob. An empty string always
@ -205,7 +205,7 @@ struct aiExportDataBlob
formats don't split assets across multiple files. formats don't split assets across multiple files.
If used, blob names usually contain the file If used, blob names usually contain the file
extension that should be used when writing extension that should be used when writing
the data to disc. the data to disc.
*/ */
C_STRUCT aiString name; C_STRUCT aiString name;
@ -229,9 +229,9 @@ private:
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Exports the given scene to a chosen file format. Returns the exported data as a binary blob which /** Exports the given scene to a chosen file format. Returns the exported data as a binary blob which
* you can write into a file or something. When you're done with the data, use #aiReleaseExportBlob() * you can write into a file or something. When you're done with the data, use #aiReleaseExportBlob()
* to free the resources associated with the export. * to free the resources associated with the export.
* @param pScene The scene to export. Stays in possession of the caller, is not changed by the function. * @param pScene The scene to export. Stays in possession of the caller, is not changed by the function.
* @param pFormatId ID string to specify to which format you want to export to. Use * @param pFormatId ID string to specify to which format you want to export to. Use
* #aiGetExportFormatCount() / #aiGetExportFormatDescription() to learn which export formats are available. * #aiGetExportFormatCount() / #aiGetExportFormatDescription() to learn which export formats are available.
* @param pPreprocessing Please see the documentation for #aiExportScene * @param pPreprocessing Please see the documentation for #aiExportScene
* @return the exported data or NULL in case of error * @return the exported data or NULL in case of error
@ -241,7 +241,7 @@ ASSIMP_API const C_STRUCT aiExportDataBlob* aiExportSceneToBlob( const C_STRUCT
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Releases the memory associated with the given exported data. Use this function to free a data blob /** Releases the memory associated with the given exported data. Use this function to free a data blob
* returned by aiExportScene(). * returned by aiExportScene().
* @param pData the data blob returned by #aiExportSceneToBlob * @param pData the data blob returned by #aiExportSceneToBlob
*/ */
ASSIMP_API void aiReleaseExportBlob( const C_STRUCT aiExportDataBlob* pData ); ASSIMP_API void aiReleaseExportBlob( const C_STRUCT aiExportDataBlob* pData );

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -71,7 +71,7 @@ typedef char* aiUserData;
* *
* Provided are functions to open and close files. Supply a custom structure to * 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 custom * the import function. If you don't, a default implementation is used. Use custom
* file systems to enable reading from other sources, such as ZIPs * file systems to enable reading from other sources, such as ZIPs
* or memory locations. */ * or memory locations. */
struct aiFileIO struct aiFileIO
{ {
@ -90,12 +90,12 @@ struct aiFileIO
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** @brief C-API: File callbacks /** @brief C-API: File callbacks
* *
* Actually, it's a data structure to wrap a set of fXXXX (e.g fopen) * Actually, it's a data structure to wrap a set of fXXXX (e.g fopen)
* replacement functions. * replacement functions.
* *
* The default implementation of the functions utilizes the fXXX functions from * The default implementation of the functions utilizes the fXXX functions from
* the CRT. However, you can supply a custom implementation to Assimp by * the CRT. However, you can supply a custom implementation to Assimp by
* delivering a custom aiFileIO. Use this to enable reading from other sources, * delivering a custom aiFileIO. Use this to enable reading from other sources,
* such as ZIP archives or memory locations. */ * such as ZIP archives or memory locations. */
struct aiFile struct aiFile
{ {
@ -105,12 +105,12 @@ struct aiFile
/** Callback to write to a file */ /** Callback to write to a file */
aiFileWriteProc WriteProc; aiFileWriteProc WriteProc;
/** Callback to retrieve the current position of /** Callback to retrieve the current position of
* the file cursor (ftell()) * the file cursor (ftell())
*/ */
aiFileTellProc TellProc; aiFileTellProc TellProc;
/** Callback to retrieve the size of the file, /** Callback to retrieve the size of the file,
* in bytes * in bytes
*/ */
aiFileTellProc FileSizeProc; aiFileTellProc FileSizeProc;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,22 +25,22 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
/** @file cimport.h /** @file cimport.h
* @brief Defines the C-API to the Open Asset Import Library. * @brief Defines the C-API to the Open Asset Import Library.
*/ */
#ifndef AI_ASSIMP_H_INC #ifndef AI_ASSIMP_H_INC
#define AI_ASSIMP_H_INC #define AI_ASSIMP_H_INC
@ -93,46 +93,46 @@ typedef int aiBool;
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Reads the given file and returns its content. /** Reads the given file and returns its content.
* *
* If the call succeeds, the imported data is returned in an aiScene structure. * If the call succeeds, the imported data is returned in an aiScene structure.
* The data is intended to be read-only, it stays property of the ASSIMP * The data is intended to be read-only, it stays property of the ASSIMP
* library and will be stable until aiReleaseImport() is called. After you're * library and will be stable until aiReleaseImport() is called. After you're
* done with it, call aiReleaseImport() to free the resources associated with * done with it, call aiReleaseImport() to free the resources associated with
* this file. If the import fails, NULL is returned instead. Call * this file. If the import fails, NULL is returned instead. Call
* aiGetErrorString() to retrieve a human-readable error text. * aiGetErrorString() to retrieve a human-readable error text.
* @param pFile Path and filename of the file to be imported, * @param pFile Path and filename of the file to be imported,
* expected to be a null-terminated c-string. NULL is not a valid value. * expected to be a null-terminated c-string. NULL is not a valid value.
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. * #aiPostProcessSteps flags.
* @return Pointer to the imported data or NULL if the import failed. * @return Pointer to the imported data or NULL if the import failed.
*/ */
ASSIMP_API const C_STRUCT aiScene* aiImportFile( ASSIMP_API const C_STRUCT aiScene* aiImportFile(
const char* pFile, const char* pFile,
unsigned int pFlags); unsigned int pFlags);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Reads the given file using user-defined I/O functions and returns /** Reads the given file using user-defined I/O functions and returns
* its content. * its content.
* *
* If the call succeeds, the imported data is returned in an aiScene structure. * If the call succeeds, the imported data is returned in an aiScene structure.
* The data is intended to be read-only, it stays property of the ASSIMP * The data is intended to be read-only, it stays property of the ASSIMP
* library and will be stable until aiReleaseImport() is called. After you're * library and will be stable until aiReleaseImport() is called. After you're
* done with it, call aiReleaseImport() to free the resources associated with * done with it, call aiReleaseImport() to free the resources associated with
* this file. If the import fails, NULL is returned instead. Call * this file. If the import fails, NULL is returned instead. Call
* aiGetErrorString() to retrieve a human-readable error text. * aiGetErrorString() to retrieve a human-readable error text.
* @param pFile Path and filename of the file to be imported, * @param pFile Path and filename of the file to be imported,
* expected to be a null-terminated c-string. NULL is not a valid value. * expected to be a null-terminated c-string. NULL is not a valid value.
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. * #aiPostProcessSteps flags.
* @param pFS aiFileIO structure. Will be used to open the model file itself * @param pFS aiFileIO structure. Will be used to open the model file itself
* and any other files the loader needs to open. Pass NULL to use the default * and any other files the loader needs to open. Pass NULL to use the default
* implementation. * implementation.
* @return Pointer to the imported data or NULL if the import failed. * @return Pointer to the imported data or NULL if the import failed.
* @note Include <aiFileIO.h> for the definition of #aiFileIO. * @note Include <aiFileIO.h> for the definition of #aiFileIO.
*/ */
ASSIMP_API const C_STRUCT aiScene* aiImportFileEx( ASSIMP_API const C_STRUCT aiScene* aiImportFileEx(
const char* pFile, const char* pFile,
unsigned int pFlags, unsigned int pFlags,
C_STRUCT aiFileIO* pFS); C_STRUCT aiFileIO* pFS);
@ -140,20 +140,20 @@ ASSIMP_API const C_STRUCT aiScene* aiImportFileEx(
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Same as #aiImportFileEx, but adds an extra parameter containing importer settings. /** Same as #aiImportFileEx, but adds an extra parameter containing importer settings.
* *
* @param pFile Path and filename of the file to be imported, * @param pFile Path and filename of the file to be imported,
* expected to be a null-terminated c-string. NULL is not a valid value. * expected to be a null-terminated c-string. NULL is not a valid value.
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. * #aiPostProcessSteps flags.
* @param pFS aiFileIO structure. Will be used to open the model file itself * @param pFS aiFileIO structure. Will be used to open the model file itself
* and any other files the loader needs to open. Pass NULL to use the default * and any other files the loader needs to open. Pass NULL to use the default
* implementation. * implementation.
* @param pProps #aiPropertyStore instance containing import settings. * @param pProps #aiPropertyStore instance containing import settings.
* @return Pointer to the imported data or NULL if the import failed. * @return Pointer to the imported data or NULL if the import failed.
* @note Include <aiFileIO.h> for the definition of #aiFileIO. * @note Include <aiFileIO.h> for the definition of #aiFileIO.
* @see aiImportFileEx * @see aiImportFileEx
*/ */
ASSIMP_API const C_STRUCT aiScene* aiImportFileExWithProperties( ASSIMP_API const C_STRUCT aiScene* aiImportFileExWithProperties(
const char* pFile, const char* pFile,
unsigned int pFlags, unsigned int pFlags,
C_STRUCT aiFileIO* pFS, C_STRUCT aiFileIO* pFS,
@ -161,36 +161,36 @@ ASSIMP_API const C_STRUCT aiScene* aiImportFileExWithProperties(
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Reads the given file from a given memory buffer, /** Reads the given file from a given memory buffer,
* *
* If the call succeeds, the contents of the file are returned as a pointer to an * If the call succeeds, the contents of the file are returned as a pointer to an
* aiScene object. The returned data is intended to be read-only, the importer keeps * aiScene object. The returned data is intended to be read-only, the importer keeps
* ownership of the data and will destroy it upon destruction. If the import fails, * ownership of the data and will destroy it upon destruction. If the import fails,
* NULL is returned. * NULL is returned.
* A human-readable error description can be retrieved by calling aiGetErrorString(). * A human-readable error description can be retrieved by calling aiGetErrorString().
* @param pBuffer Pointer to the file data * @param pBuffer Pointer to the file data
* @param pLength Length of pBuffer, in bytes * @param pLength Length of pBuffer, in bytes
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. If you wish to inspect the imported * #aiPostProcessSteps flags. If you wish to inspect the imported
* scene first in order to fine-tune your post-processing setup, * scene first in order to fine-tune your post-processing setup,
* consider to use #aiApplyPostProcessing(). * consider to use #aiApplyPostProcessing().
* @param pHint An additional hint to the library. If this is a non empty string, * @param pHint An additional hint to the library. If this is a non empty string,
* the library looks for a loader to support the file extension specified by pHint * the library looks for a loader to support the file extension specified by pHint
* and passes the file to the first matching loader. If this loader is unable to * and passes the file to the first matching loader. If this loader is unable to
* completely the request, the library continues and tries to determine the file * completely the request, the library continues and tries to determine the file
* format on its own, a task that may or may not be successful. * format on its own, a task that may or may not be successful.
* Check the return value, and you'll know ... * Check the return value, and you'll know ...
* @return A pointer to the imported data, NULL if the import failed. * @return A pointer to the imported data, NULL if the import failed.
* *
* @note This is a straightforward way to decode models from memory * @note This is a straightforward way to decode models from memory
* buffers, but it doesn't handle model formats that spread their * buffers, but it doesn't handle model formats that spread their
* data across multiple files or even directories. Examples include * data across multiple files or even directories. Examples include
* OBJ or MD3, which outsource parts of their material info into * OBJ or MD3, which outsource parts of their material info into
* external scripts. If you need full functionality, provide * external scripts. If you need full functionality, provide
* a custom IOSystem to make Assimp find these files and use * a custom IOSystem to make Assimp find these files and use
* the regular aiImportFileEx()/aiImportFileExWithProperties() API. * the regular aiImportFileEx()/aiImportFileExWithProperties() API.
*/ */
ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory( ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory(
const char* pBuffer, const char* pBuffer,
unsigned int pLength, unsigned int pLength,
unsigned int pFlags, unsigned int pFlags,
@ -201,22 +201,22 @@ ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory(
* *
* @param pBuffer Pointer to the file data * @param pBuffer Pointer to the file data
* @param pLength Length of pBuffer, in bytes * @param pLength Length of pBuffer, in bytes
* @param pFlags Optional post processing steps to be executed after * @param pFlags Optional post processing steps to be executed after
* a successful import. Provide a bitwise combination of the * a successful import. Provide a bitwise combination of the
* #aiPostProcessSteps flags. If you wish to inspect the imported * #aiPostProcessSteps flags. If you wish to inspect the imported
* scene first in order to fine-tune your post-processing setup, * scene first in order to fine-tune your post-processing setup,
* consider to use #aiApplyPostProcessing(). * consider to use #aiApplyPostProcessing().
* @param pHint An additional hint to the library. If this is a non empty string, * @param pHint An additional hint to the library. If this is a non empty string,
* the library looks for a loader to support the file extension specified by pHint * the library looks for a loader to support the file extension specified by pHint
* and passes the file to the first matching loader. If this loader is unable to * and passes the file to the first matching loader. If this loader is unable to
* completely the request, the library continues and tries to determine the file * completely the request, the library continues and tries to determine the file
* format on its own, a task that may or may not be successful. * format on its own, a task that may or may not be successful.
* Check the return value, and you'll know ... * Check the return value, and you'll know ...
* @param pProps #aiPropertyStore instance containing import settings. * @param pProps #aiPropertyStore instance containing import settings.
* @return A pointer to the imported data, NULL if the import failed. * @return A pointer to the imported data, NULL if the import failed.
* *
* @note This is a straightforward way to decode models from memory * @note This is a straightforward way to decode models from memory
* buffers, but it doesn't handle model formats that spread their * buffers, but it doesn't handle model formats that spread their
* data across multiple files or even directories. Examples include * data across multiple files or even directories. Examples include
* OBJ or MD3, which outsource parts of their material info into * OBJ or MD3, which outsource parts of their material info into
* external scripts. If you need full functionality, provide * external scripts. If you need full functionality, provide
@ -224,7 +224,7 @@ ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemory(
* the regular aiImportFileEx()/aiImportFileExWithProperties() API. * the regular aiImportFileEx()/aiImportFileExWithProperties() API.
* @see aiImportFileFromMemory * @see aiImportFileFromMemory
*/ */
ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemoryWithProperties( ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemoryWithProperties(
const char* pBuffer, const char* pBuffer,
unsigned int pLength, unsigned int pLength,
unsigned int pFlags, unsigned int pFlags,
@ -235,15 +235,15 @@ ASSIMP_API const C_STRUCT aiScene* aiImportFileFromMemoryWithProperties(
/** Apply post-processing to an already-imported scene. /** Apply post-processing to an already-imported scene.
* *
* This is strictly equivalent to calling #aiImportFile()/#aiImportFileEx with the * This is strictly equivalent to calling #aiImportFile()/#aiImportFileEx with the
* same flags. However, you can use this separate function to inspect the imported * same flags. However, you can use this separate function to inspect the imported
* scene first to fine-tune your post-processing setup. * scene first to fine-tune your post-processing setup.
* @param pScene Scene to work on. * @param pScene Scene to work on.
* @param pFlags Provide a bitwise combination of the #aiPostProcessSteps flags. * @param pFlags Provide a bitwise combination of the #aiPostProcessSteps flags.
* @return A pointer to the post-processed data. Post processing is done in-place, * @return A pointer to the post-processed data. Post processing is done in-place,
* meaning this is still the same #aiScene which you passed for pScene. However, * meaning this is still the same #aiScene which you passed for pScene. However,
* _if_ post-processing failed, the scene could now be NULL. That's quite a rare * _if_ post-processing failed, the scene could now be NULL. That's quite a rare
* case, post processing steps are not really designed to 'fail'. To be exact, * case, post processing steps are not really designed to 'fail'. To be exact,
* the #aiProcess_ValidateDataStructure flag is currently the only post processing step * the #aiProcess_ValidateDataStructure flag is currently the only post processing step
* which can actually cause the scene to be reset to NULL. * which can actually cause the scene to be reset to NULL.
*/ */
ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing( ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing(
@ -251,9 +251,9 @@ ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing(
unsigned int pFlags); unsigned int pFlags);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Get one of the predefine log streams. This is the quick'n'easy solution to /** Get one of the predefine log streams. This is the quick'n'easy solution to
* access Assimp's log system. Attaching a log stream can slightly reduce Assimp's * access Assimp's log system. Attaching a log stream can slightly reduce Assimp's
* overall import performance. * overall import performance.
* *
* Usage is rather simple (this will stream the log to a file, named log.txt, and * Usage is rather simple (this will stream the log to a file, named log.txt, and
* the stdout stream of the process: * the stdout stream of the process:
@ -265,7 +265,7 @@ ASSIMP_API const C_STRUCT aiScene* aiApplyPostProcessing(
* aiAttachLogStream(&c); * aiAttachLogStream(&c);
* @endcode * @endcode
* *
* @param pStreams One of the #aiDefaultLogStream enumerated values. * @param pStreams One of the #aiDefaultLogStream enumerated values.
* @param file Solely for the #aiDefaultLogStream_FILE flag: specifies the file to write to. * @param file Solely for the #aiDefaultLogStream_FILE flag: specifies the file to write to.
* Pass NULL for all other flags. * Pass NULL for all other flags.
* @return The log stream. callback is set to NULL if something went wrong. * @return The log stream. callback is set to NULL if something went wrong.
@ -278,10 +278,10 @@ ASSIMP_API C_STRUCT aiLogStream aiGetPredefinedLogStream(
/** Attach a custom log stream to the libraries' logging system. /** Attach a custom log stream to the libraries' logging system.
* *
* Attaching a log stream can slightly reduce Assimp's overall import * Attaching a log stream can slightly reduce Assimp's overall import
* performance. Multiple log-streams can be attached. * performance. Multiple log-streams can be attached.
* @param stream Describes the new log stream. * @param stream Describes the new log stream.
* @note To ensure proper destruction of the logging system, you need to manually * @note To ensure proper destruction of the logging system, you need to manually
* call aiDetachLogStream() on every single log stream you attach. * call aiDetachLogStream() on every single log stream you attach.
* Alternatively (for the lazy folks) #aiDetachAllLogStreams is provided. * Alternatively (for the lazy folks) #aiDetachAllLogStreams is provided.
*/ */
ASSIMP_API void aiAttachLogStream( ASSIMP_API void aiAttachLogStream(
@ -324,11 +324,11 @@ ASSIMP_API void aiDetachAllLogStreams(void);
* Call this function after you're done with the imported data. * Call this function after you're done with the imported data.
* @param pScene The imported data to release. NULL is a valid value. * @param pScene The imported data to release. NULL is a valid value.
*/ */
ASSIMP_API void aiReleaseImport( ASSIMP_API void aiReleaseImport(
const C_STRUCT aiScene* pScene); const C_STRUCT aiScene* pScene);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Returns the error text of the last failed import process. /** Returns the error text of the last failed import process.
* *
* @return A textual description of the error that occurred at the last * @return A textual description of the error that occurred at the last
* import process. NULL if there was no error. There can't be an error if you * import process. NULL if there was no error. There can't be an error if you
@ -360,7 +360,7 @@ ASSIMP_API void aiGetExtensionList(
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Get the approximated storage required by an imported asset /** Get the approximated storage required by an imported asset
* @param pIn Input asset. * @param pIn Input asset.
* @param in Data structure to be filled. * @param in Data structure to be filled.
*/ */
ASSIMP_API void aiGetMemoryRequirements( ASSIMP_API void aiGetMemoryRequirements(
const C_STRUCT aiScene* pIn, const C_STRUCT aiScene* pIn,
@ -383,31 +383,31 @@ ASSIMP_API C_STRUCT aiPropertyStore* aiCreatePropertyStore(void);
ASSIMP_API void aiReleasePropertyStore(C_STRUCT aiPropertyStore* p); ASSIMP_API void aiReleasePropertyStore(C_STRUCT aiPropertyStore* p);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Set an integer property. /** Set an integer property.
* *
* This is the C-version of #Assimp::Importer::SetPropertyInteger(). In the C * This is the C-version of #Assimp::Importer::SetPropertyInteger(). In the C
* interface, properties are always shared by all imports. It is not possible to * interface, properties are always shared by all imports. It is not possible to
* specify them per import. * specify them per import.
* *
* @param store Store to modify. Use #aiCreatePropertyStore to obtain a store. * @param store Store to modify. Use #aiCreatePropertyStore to obtain a store.
* @param szName Name of the configuration property to be set. All supported * @param szName Name of the configuration property to be set. All supported
* public properties are defined in the config.h header file (AI_CONFIG_XXX). * public properties are defined in the config.h header file (AI_CONFIG_XXX).
* @param value New value for the property * @param value New value for the property
*/ */
ASSIMP_API void aiSetImportPropertyInteger( ASSIMP_API void aiSetImportPropertyInteger(
C_STRUCT aiPropertyStore* store, C_STRUCT aiPropertyStore* store,
const char* szName, const char* szName,
int value); int value);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Set a floating-point property. /** Set a floating-point property.
* *
* This is the C-version of #Assimp::Importer::SetPropertyFloat(). In the C * This is the C-version of #Assimp::Importer::SetPropertyFloat(). In the C
* interface, properties are always shared by all imports. It is not possible to * interface, properties are always shared by all imports. It is not possible to
* specify them per import. * specify them per import.
* *
* @param store Store to modify. Use #aiCreatePropertyStore to obtain a store. * @param store Store to modify. Use #aiCreatePropertyStore to obtain a store.
* @param szName Name of the configuration property to be set. All supported * @param szName Name of the configuration property to be set. All supported
* public properties are defined in the config.h header file (AI_CONFIG_XXX). * public properties are defined in the config.h header file (AI_CONFIG_XXX).
* @param value New value for the property * @param value New value for the property
*/ */
@ -417,14 +417,14 @@ ASSIMP_API void aiSetImportPropertyFloat(
float value); float value);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Set a string property. /** Set a string property.
* *
* This is the C-version of #Assimp::Importer::SetPropertyString(). In the C * This is the C-version of #Assimp::Importer::SetPropertyString(). In the C
* interface, properties are always shared by all imports. It is not possible to * interface, properties are always shared by all imports. It is not possible to
* specify them per import. * specify them per import.
* *
* @param store Store to modify. Use #aiCreatePropertyStore to obtain a store. * @param store Store to modify. Use #aiCreatePropertyStore to obtain a store.
* @param szName Name of the configuration property to be set. All supported * @param szName Name of the configuration property to be set. All supported
* public properties are defined in the config.h header file (AI_CONFIG_XXX). * public properties are defined in the config.h header file (AI_CONFIG_XXX).
* @param st New value for the property * @param st New value for the property
*/ */
@ -434,14 +434,14 @@ ASSIMP_API void aiSetImportPropertyString(
const C_STRUCT aiString* st); const C_STRUCT aiString* st);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Set a matrix property. /** Set a matrix property.
* *
* This is the C-version of #Assimp::Importer::SetPropertyMatrix(). In the C * This is the C-version of #Assimp::Importer::SetPropertyMatrix(). In the C
* interface, properties are always shared by all imports. It is not possible to * interface, properties are always shared by all imports. It is not possible to
* specify them per import. * specify them per import.
* *
* @param store Store to modify. Use #aiCreatePropertyStore to obtain a store. * @param store Store to modify. Use #aiCreatePropertyStore to obtain a store.
* @param szName Name of the configuration property to be set. All supported * @param szName Name of the configuration property to be set. All supported
* public properties are defined in the config.h header file (AI_CONFIG_XXX). * public properties are defined in the config.h header file (AI_CONFIG_XXX).
* @param mat New value for the property * @param mat New value for the property
*/ */
@ -463,7 +463,7 @@ ASSIMP_API void aiCreateQuaternionFromMatrix(
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Decompose a transformation matrix into its rotational, translational and /** Decompose a transformation matrix into its rotational, translational and
* scaling components. * scaling components.
* *
* @param mat Matrix to decompose * @param mat Matrix to decompose
* @param scaling Receives the scaling component * @param scaling Receives the scaling component
* @param rotation Receives the rotational component * @param rotation Receives the rotational component
@ -472,7 +472,7 @@ ASSIMP_API void aiCreateQuaternionFromMatrix(
*/ */
ASSIMP_API void aiDecomposeMatrix( ASSIMP_API void aiDecomposeMatrix(
const C_STRUCT aiMatrix4x4* mat, const C_STRUCT aiMatrix4x4* mat,
C_STRUCT aiVector3D* scaling, C_STRUCT aiVector3D* scaling,
C_STRUCT aiQuaternion* rotation, C_STRUCT aiQuaternion* rotation,
C_STRUCT aiVector3D* position); C_STRUCT aiVector3D* position);
@ -496,7 +496,7 @@ ASSIMP_API void aiTransposeMatrix3(
* @param mat Matrix to transform the vector with. * @param mat Matrix to transform the vector with.
*/ */
ASSIMP_API void aiTransformVecByMatrix3( ASSIMP_API void aiTransformVecByMatrix3(
C_STRUCT aiVector3D* vec, C_STRUCT aiVector3D* vec,
const C_STRUCT aiMatrix3x3* mat); const C_STRUCT aiMatrix3x3* mat);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
@ -505,7 +505,7 @@ ASSIMP_API void aiTransformVecByMatrix3(
* @param mat Matrix to transform the vector with. * @param mat Matrix to transform the vector with.
*/ */
ASSIMP_API void aiTransformVecByMatrix4( ASSIMP_API void aiTransformVecByMatrix4(
C_STRUCT aiVector3D* vec, C_STRUCT aiVector3D* vec,
const C_STRUCT aiMatrix4x4* mat); const C_STRUCT aiMatrix4x4* mat);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
@ -514,7 +514,7 @@ ASSIMP_API void aiTransformVecByMatrix4(
* @param src Matrix to be multiplied with 'dst'. * @param src Matrix to be multiplied with 'dst'.
*/ */
ASSIMP_API void aiMultiplyMatrix4( ASSIMP_API void aiMultiplyMatrix4(
C_STRUCT aiMatrix4x4* dst, C_STRUCT aiMatrix4x4* dst,
const C_STRUCT aiMatrix4x4* src); const C_STRUCT aiMatrix4x4* src);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
@ -523,7 +523,7 @@ ASSIMP_API void aiMultiplyMatrix4(
* @param src Matrix to be multiplied with 'dst'. * @param src Matrix to be multiplied with 'dst'.
*/ */
ASSIMP_API void aiMultiplyMatrix3( ASSIMP_API void aiMultiplyMatrix3(
C_STRUCT aiMatrix3x3* dst, C_STRUCT aiMatrix3x3* dst,
const C_STRUCT aiMatrix3x3* src); const C_STRUCT aiMatrix3x3* src);
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef __cplusplus #ifdef __cplusplus
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** Represents a color in Red-Green-Blue space including an /** Represents a color in Red-Green-Blue space including an
* alpha component. Color values range from 0 to 1. */ * alpha component. Color values range from 0 to 1. */
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
@ -57,10 +57,10 @@ class aiColor4t
{ {
public: public:
aiColor4t () : r(), g(), b(), a() {} aiColor4t () : r(), g(), b(), a() {}
aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a) aiColor4t (TReal _r, TReal _g, TReal _b, TReal _a)
: r(_r), g(_g), b(_b), a(_a) {} : r(_r), g(_g), b(_b), a(_a) {}
aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {} aiColor4t (TReal _r) : r(_r), g(_r), b(_r), a(_r) {}
aiColor4t (const aiColor4t& o) aiColor4t (const aiColor4t& o)
: r(o.r), g(o.g), b(o.b), a(o.a) {} : r(o.r), g(o.g), b(o.b), a(o.a) {}
public: public:
@ -85,7 +85,7 @@ public:
public: public:
// Red, green, blue and alpha color values // Red, green, blue and alpha color values
TReal r, g, b, a; TReal r, g, b, a;
} PACK_STRUCT; // !struct aiColor4D } PACK_STRUCT; // !struct aiColor4D

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -51,26 +51,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator += (const aiColor4t<TReal>& o) { AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator += (const aiColor4t<TReal>& o) {
r += o.r; g += o.g; b += o.b; a += o.a; r += o.r; g += o.g; b += o.b; a += o.a;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator -= (const aiColor4t<TReal>& o) { AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator -= (const aiColor4t<TReal>& o) {
r -= o.r; g -= o.g; b -= o.b; a -= o.a; r -= o.r; g -= o.g; b -= o.b; a -= o.a;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator *= (TReal f) { AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator *= (TReal f) {
r *= f; g *= f; b *= f; a *= f; r *= f; g *= f; b *= f; a *= f;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator /= (TReal f) { AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator /= (TReal f) {
r /= f; g /= f; b /= f; a /= f; r /= f; g /= f; b /= f; a /= f;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -42,11 +42,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file config.h /** @file config.h
* @brief Defines constants for configurable properties for the library * @brief Defines constants for configurable properties for the library
* *
* Typically these properties are set via * Typically these properties are set via
* #Assimp::Importer::SetPropertyFloat, * #Assimp::Importer::SetPropertyFloat,
* #Assimp::Importer::SetPropertyInteger or * #Assimp::Importer::SetPropertyInteger or
* #Assimp::Importer::SetPropertyString, * #Assimp::Importer::SetPropertyString,
* depending on the data type of a property. All properties have a * depending on the data type of a property. All properties have a
* default value. See the doc for the mentioned methods for more details. * default value. See the doc for the mentioned methods for more details.
* *
* <br><br> * <br><br>
@ -71,7 +71,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* process (i.e. IO time, importing, postprocessing, ..) and dumps * process (i.e. IO time, importing, postprocessing, ..) and dumps
* these timings to the DefaultLogger. See the @link perf Performance * these timings to the DefaultLogger. See the @link perf Performance
* Page@endlink for more information on this topic. * Page@endlink for more information on this topic.
* *
* Property type: bool. Default value: false. * Property type: bool. Default value: false.
*/ */
#define AI_CONFIG_GLOB_MEASURE_TIME \ #define AI_CONFIG_GLOB_MEASURE_TIME \
@ -130,7 +130,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"PP_SBBC_MAX_BONES" "PP_SBBC_MAX_BONES"
// default limit for bone count // default limit for bone count
#if (!defined AI_SBBC_DEFAULT_MAX_BONES) #if (!defined AI_SBBC_DEFAULT_MAX_BONES)
# define AI_SBBC_DEFAULT_MAX_BONES 60 # define AI_SBBC_DEFAULT_MAX_BONES 60
#endif #endif
@ -150,7 +150,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Source UV channel for tangent space computation. /** @brief Source UV channel for tangent space computation.
* *
* The specified channel must exist or an error will be raised. * The specified channel must exist or an error will be raised.
* Property type: integer. Default value: 0 * Property type: integer. Default value: 0
*/ */
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -163,8 +163,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Sometimes referred to as 'crease angle'. * Sometimes referred to as 'crease angle'.
* This applies to the GenSmoothNormals-Step. The angle is specified * This applies to the GenSmoothNormals-Step. The angle is specified
* in degrees, so 180 is PI. The default value is 175 degrees (all vertex * in degrees, so 180 is PI. The default value is 175 degrees (all vertex
* normals are smoothed). The maximum value is 175, too. Property type: float. * normals are smoothed). The maximum value is 175, too. Property type: float.
* Warning: setting this option may cause a severe loss of performance. The * Warning: setting this option may cause a severe loss of performance. The
* performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but * performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but
* the output quality may be reduced. * the output quality may be reduced.
@ -180,14 +180,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This must be a valid path to a file. The file is 768 (256*3) bytes * This must be a valid path to a file. The file is 768 (256*3) bytes
* large and contains RGB triplets for each of the 256 palette entries. * large and contains RGB triplets for each of the 256 palette entries.
* The default value is colormap.lmp. If the file is not found, * The default value is colormap.lmp. If the file is not found,
* a default palette (from Quake 1) is used. * a default palette (from Quake 1) is used.
* Property type: string. * Property type: string.
*/ */
#define AI_CONFIG_IMPORT_MDL_COLORMAP \ #define AI_CONFIG_IMPORT_MDL_COLORMAP \
"IMPORT_MDL_COLORMAP" "IMPORT_MDL_COLORMAP"
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_RemoveRedundantMaterials step to /** @brief Configures the #aiProcess_RemoveRedundantMaterials step to
* keep materials matching a name in a given list. * keep materials matching a name in a given list.
* *
* This is a list of 1 to n strings, ' ' serves as delimiter character. * This is a list of 1 to n strings, ' ' serves as delimiter character.
@ -196,10 +196,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>. * "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>.
* If a material matches on of these names, it will not be modified or * If a material matches on of these names, it will not be modified or
* removed by the postprocessing step nor will other materials be replaced * removed by the postprocessing step nor will other materials be replaced
* by a reference to it. <br> * by a reference to it. <br>
* This option might be useful if you are using some magic material names * This option might be useful if you are using some magic material names
* to pass additional semantics through the content pipeline. This ensures * to pass additional semantics through the content pipeline. This ensures
* they won't be optimized away, but a general optimization is still * they won't be optimized away, but a general optimization is still
* performed for materials not contained in the list. * performed for materials not contained in the list.
* Property type: String. Default value: n/a * Property type: String. Default value: n/a
* @note Linefeeds, tabs or carriage returns are treated as whitespace. * @note Linefeeds, tabs or carriage returns are treated as whitespace.
@ -211,11 +211,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_PreTransformVertices step to /** @brief Configures the #aiProcess_PreTransformVertices step to
* keep the scene hierarchy. Meshes are moved to worldspace, but * keep the scene hierarchy. Meshes are moved to worldspace, but
* no optimization is performed (read: meshes with equal materials are not * no optimization is performed (read: meshes with equal materials are not
* joined. The total number of meshes won't change). * joined. The total number of meshes won't change).
* *
* This option could be of use for you if the scene hierarchy contains * This option could be of use for you if the scene hierarchy contains
* important additional information which you intend to parse. * important additional information which you intend to parse.
* For rendering, you can still render all meshes in the scene without * For rendering, you can still render all meshes in the scene without
* any transformations. * any transformations.
* Property type: bool. Default value: false. * Property type: bool. Default value: false.
@ -228,7 +228,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* all vertex components into the [-1,1] range. That is, a bounding box * all vertex components into the [-1,1] range. That is, a bounding box
* for the whole scene is computed, the maximum component is taken and all * for the whole scene is computed, the maximum component is taken and all
* meshes are scaled appropriately (uniformly of course!). * meshes are scaled appropriately (uniformly of course!).
* This might be useful if you don't know the spatial dimension of the input * This might be useful if you don't know the spatial dimension of the input
* data*/ * data*/
#define AI_CONFIG_PP_PTV_NORMALIZE \ #define AI_CONFIG_PP_PTV_NORMALIZE \
"PP_PTV_NORMALIZE" "PP_PTV_NORMALIZE"
@ -236,7 +236,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the #aiProcess_PreTransformVertices step to use /** @brief Configures the #aiProcess_PreTransformVertices step to use
* a users defined matrix as the scene root node transformation before * a users defined matrix as the scene root node transformation before
* transforming vertices. * transforming vertices.
* Property type: bool. Default value: false. * Property type: bool. Default value: false.
*/ */
#define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION \ #define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION \
@ -274,10 +274,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* quotation marks. For example:<tt> * quotation marks. For example:<tt>
* "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>. * "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>.
* If a node matches on of these names, it will not be modified or * If a node matches on of these names, it will not be modified or
* removed by the postprocessing step.<br> * removed by the postprocessing step.<br>
* This option might be useful if you are using some magic node names * This option might be useful if you are using some magic node names
* to pass additional semantics through the content pipeline. This ensures * to pass additional semantics through the content pipeline. This ensures
* they won't be optimized away, but a general optimization is still * they won't be optimized away, but a general optimization is still
* performed for nodes not contained in the list. * performed for nodes not contained in the list.
* Property type: String. Default value: n/a * Property type: String. Default value: n/a
* @note Linefeeds, tabs or carriage returns are treated as whitespace. * @note Linefeeds, tabs or carriage returns are treated as whitespace.
@ -308,7 +308,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This is used by the "SplitLargeMeshes" PostProcess-Step to determine * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
* whether a mesh must be split or not. * whether a mesh must be split or not.
* @note The default value is AI_SLM_DEFAULT_MAX_VERTICES * @note The default value is AI_SLM_DEFAULT_MAX_VERTICES
* Property type: integer. * Property type: integer.
*/ */
#define AI_CONFIG_PP_SLM_VERTEX_LIMIT \ #define AI_CONFIG_PP_SLM_VERTEX_LIMIT \
"PP_SLM_VERTEX_LIMIT" "PP_SLM_VERTEX_LIMIT"
@ -480,7 +480,7 @@ enum aiComponent
* Specifies the floating-point accuracy for animation values. The step * Specifies the floating-point accuracy for animation values. The step
* checks for animation tracks where all frame values are absolutely equal * checks for animation tracks where all frame values are absolutely equal
* and removes them. This tweakable controls the epsilon for floating-point * and removes them. This tweakable controls the epsilon for floating-point
* comparisons - two keys are considered equal if the invariant * comparisons - two keys are considered equal if the invariant
* abs(n0-n1)>epsilon holds true for all vector respectively quaternion * abs(n0-n1)>epsilon holds true for all vector respectively quaternion
* components. The default value is 0.f - comparisons are exact then. * components. The default value is 0.f - comparisons are exact then.
*/ */
@ -505,7 +505,7 @@ enum aiComponent
* Specifies which UV transformations are evaluated. * Specifies which UV transformations are evaluated.
* *
* This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer * This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer
* property, of course). By default all transformations are enabled * property, of course). By default all transformations are enabled
* (AI_UVTRAFO_ALL). * (AI_UVTRAFO_ALL).
*/ */
#define AI_CONFIG_PP_TUV_EVALUATE \ #define AI_CONFIG_PP_TUV_EVALUATE \
@ -516,7 +516,7 @@ enum aiComponent
* *
* Enabling this option may result in faster loading, but it needn't. * Enabling this option may result in faster loading, but it needn't.
* It represents just a hint to loaders and post-processing steps to use * It represents just a hint to loaders and post-processing steps to use
* faster code paths, if possible. * faster code paths, if possible.
* This property is expected to be an integer, != 0 stands for true. * This property is expected to be an integer, != 0 stands for true.
* The default value is 0. * The default value is 0.
*/ */
@ -649,7 +649,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the AC loader to collect all surfaces which have the /** @brief Configures the AC loader to collect all surfaces which have the
* "Backface cull" flag set in separate meshes. * "Backface cull" flag set in separate meshes.
* *
* Property type: bool. Default value: true. * Property type: bool. Default value: true.
*/ */
@ -659,7 +659,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures whether the AC loader evaluates subdivision surfaces ( /** @brief Configures whether the AC loader evaluates subdivision surfaces (
* indicated by the presence of the 'subdiv' attribute in the file). By * indicated by the presence of the 'subdiv' attribute in the file). By
* default, Assimp performs the subdivision using the standard * default, Assimp performs the subdivision using the standard
* Catmull-Clark algorithm * Catmull-Clark algorithm
* *
* * Property type: bool. Default value: true. * * Property type: bool. Default value: true.
@ -677,7 +677,7 @@ enum aiComponent
"UNREAL_HANDLE_FLAGS" "UNREAL_HANDLE_FLAGS"
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the terragen import plugin to compute uv's for /** @brief Configures the terragen import plugin to compute uv's for
* terrains, if not given. Furthermore a default texture is assigned. * terrains, if not given. Furthermore a default texture is assigned.
* *
* UV coordinates for terrains are so simple to compute that you'll usually * UV coordinates for terrains are so simple to compute that you'll usually
@ -692,7 +692,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the ASE loader to always reconstruct normal vectors /** @brief Configures the ASE loader to always reconstruct normal vectors
* basing on the smoothing groups loaded from the file. * basing on the smoothing groups loaded from the file.
* *
* Some ASE files have carry invalid normals, other don't. * Some ASE files have carry invalid normals, other don't.
* * Property type: bool. Default value: true. * * Property type: bool. Default value: true.
*/ */
@ -700,12 +700,12 @@ enum aiComponent
"IMPORT_ASE_RECONSTRUCT_NORMALS" "IMPORT_ASE_RECONSTRUCT_NORMALS"
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the M3D loader to detect and process multi-part /** @brief Configures the M3D loader to detect and process multi-part
* Quake player models. * Quake player models.
* *
* These models usually consist of 3 files, lower.md3, upper.md3 and * These models usually consist of 3 files, lower.md3, upper.md3 and
* head.md3. If this property is set to true, Assimp will try to load and * head.md3. If this property is set to true, Assimp will try to load and
* combine all three files if one of them is loaded. * combine all three files if one of them is loaded.
* Property type: bool. Default value: true. * Property type: bool. Default value: true.
*/ */
#define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \ #define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \
@ -714,9 +714,9 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Tells the MD3 loader which skin files to load. /** @brief Tells the MD3 loader which skin files to load.
* *
* When loading MD3 files, Assimp checks whether a file * When loading MD3 files, Assimp checks whether a file
* [md3_file_name]_[skin_name].skin is existing. These files are used by * [md3_file_name]_[skin_name].skin is existing. These files are used by
* Quake III to be able to assign different skins (e.g. red and blue team) * Quake III to be able to assign different skins (e.g. red and blue team)
* to models. 'default', 'red', 'blue' are typical skin names. * to models. 'default', 'red', 'blue' are typical skin names.
* Property type: String. Default value: "default". * Property type: String. Default value: "default".
*/ */
@ -727,14 +727,14 @@ enum aiComponent
/** @brief Specify the Quake 3 shader file to be used for a particular /** @brief Specify the Quake 3 shader file to be used for a particular
* MD3 file. This can also be a search path. * MD3 file. This can also be a search path.
* *
* By default Assimp's behaviour is as follows: If a MD3 file * By default Assimp's behaviour is as follows: If a MD3 file
* <tt>any_path/models/any_q3_subdir/model_name/file_name.md3</tt> is * <tt>any_path/models/any_q3_subdir/model_name/file_name.md3</tt> is
* loaded, the library tries to locate the corresponding shader file in * loaded, the library tries to locate the corresponding shader file in
* <tt>any_path/scripts/model_name.shader</tt>. This property overrides this * <tt>any_path/scripts/model_name.shader</tt>. This property overrides this
* behaviour. It can either specify a full path to the shader to be loaded * behaviour. It can either specify a full path to the shader to be loaded
* or alternatively the path (relative or absolute) to the directory where * or alternatively the path (relative or absolute) to the directory where
* the shaders for all MD3s to be loaded reside. Assimp attempts to open * the shaders for all MD3s to be loaded reside. Assimp attempts to open
* <tt>IMPORT_MD3_SHADER_SRC/model_name.shader</tt> first, <tt>IMPORT_MD3_SHADER_SRC/file_name.shader</tt> * <tt>IMPORT_MD3_SHADER_SRC/model_name.shader</tt> first, <tt>IMPORT_MD3_SHADER_SRC/file_name.shader</tt>
* is the fallback file. Note that IMPORT_MD3_SHADER_SRC should have a terminal (back)slash. * is the fallback file. Note that IMPORT_MD3_SHADER_SRC should have a terminal (back)slash.
* Property type: String. Default value: n/a. * Property type: String. Default value: n/a.
*/ */
@ -743,7 +743,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the LWO loader to load just one layer from the model. /** @brief Configures the LWO loader to load just one layer from the model.
* *
* LWO files consist of layers and in some cases it could be useful to load * LWO files consist of layers and in some cases it could be useful to load
* only one of them. This property can be either a string - which specifies * only one of them. This property can be either a string - which specifies
* the name of the layer - or an integer - the index of the layer. If the * the name of the layer - or an integer - the index of the layer. If the
@ -758,12 +758,12 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Configures the MD5 loader to not load the MD5ANIM file for /** @brief Configures the MD5 loader to not load the MD5ANIM file for
* a MD5MESH file automatically. * a MD5MESH file automatically.
* *
* The default strategy is to look for a file with the same name but the * The default strategy is to look for a file with the same name but the
* MD5ANIM extension in the same directory. If it is found, it is loaded * MD5ANIM extension in the same directory. If it is found, it is loaded
* and combined with the MD5MESH file. This configuration option can be * and combined with the MD5MESH file. This configuration option can be
* used to disable this behaviour. * used to disable this behaviour.
* *
* * Property type: bool. Default value: false. * * Property type: bool. Default value: false.
*/ */
#define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \ #define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
@ -772,7 +772,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Defines the begin of the time range for which the LWS loader /** @brief Defines the begin of the time range for which the LWS loader
* evaluates animations and computes aiNodeAnim's. * evaluates animations and computes aiNodeAnim's.
* *
* Assimp provides full conversion of LightWave's envelope system, including * Assimp provides full conversion of LightWave's envelope system, including
* pre and post conditions. The loader computes linearly subsampled animation * pre and post conditions. The loader computes linearly subsampled animation
* chanels with the frame rate given in the LWS file. This property defines * chanels with the frame rate given in the LWS file. This property defines
@ -792,7 +792,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Defines the output frame rate of the IRR loader. /** @brief Defines the output frame rate of the IRR loader.
* *
* IRR animations are difficult to convert for Assimp and there will * IRR animations are difficult to convert for Assimp and there will
* always be a loss of quality. This setting defines how many keys per second * always be a loss of quality. This setting defines how many keys per second
* are returned by the converter.<br> * are returned by the converter.<br>
@ -805,7 +805,7 @@ enum aiComponent
/** @brief Ogre Importer will try to find referenced materials from this file. /** @brief Ogre Importer will try to find referenced materials from this file.
* *
* Ogre meshes reference with material names, this does not tell Assimp the file * Ogre meshes reference with material names, this does not tell Assimp the file
* where it is located in. Assimp will try to find the source file in the following * where it is located in. Assimp will try to find the source file in the following
* order: <material-name>.material, <mesh-filename-base>.material and * order: <material-name>.material, <mesh-filename-base>.material and
* lastly the material name defined by this config property. * lastly the material name defined by this config property.
* <br> * <br>
@ -821,11 +821,11 @@ enum aiComponent
* depends on the used shader or Ogre's fixed pipeline. If this config property * depends on the used shader or Ogre's fixed pipeline. If this config property
* is true Assimp will try to detect the type from the textures filename postfix: * is true Assimp will try to detect the type from the textures filename postfix:
* _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec, * _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec,
* _specular and _specularmap for specular map, _l, _light, _lightmap, _occ * _specular and _specularmap for specular map, _l, _light, _lightmap, _occ
* and _occlusion for light map, _disp and _displacement for displacement map. * and _occlusion for light map, _disp and _displacement for displacement map.
* The matching is case insensitive. Post fix is taken between the last * The matching is case insensitive. Post fix is taken between the last
* underscore and the last period. * underscore and the last period.
* Default behavior is to detect type from lower cased texture unit name by * Default behavior is to detect type from lower cased texture unit name by
* matching against: normalmap, specularmap, lightmap and displacementmap. * matching against: normalmap, specularmap, lightmap and displacementmap.
* For both cases if no match is found aiTextureType_DIFFUSE is used. * For both cases if no match is found aiTextureType_DIFFUSE is used.
* <br> * <br>
@ -852,7 +852,7 @@ enum aiComponent
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Specifies whether the IFC loader skips over /** @brief Specifies whether the IFC loader skips over
* shape representations of type 'Curve2D'. * shape representations of type 'Curve2D'.
* *
* A lot of files contain both a faceted mesh representation and a outline * A lot of files contain both a faceted mesh representation and a outline
@ -867,7 +867,7 @@ enum aiComponent
* algorithm to triangulate wall and floor meshes. * algorithm to triangulate wall and floor meshes.
* *
* If this property is set to false, walls will be either triangulated by * If this property is set to false, walls will be either triangulated by
* #aiProcess_Triangulate or will be passed through as huge polygons with * #aiProcess_Triangulate or will be passed through as huge polygons with
* faked holes (i.e. holes that are connected with the outer boundary using * faked holes (i.e. holes that are connected with the outer boundary using
* a dummy edge). It is highly recommended to set this property to true * a dummy edge). It is highly recommended to set this property to true
* if you want triangulated data because #aiProcess_Triangulate is known to * if you want triangulated data because #aiProcess_Triangulate is known to

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific /* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
* file format loader. The loader is be excluded from the * file format loader. The loader is be excluded from the
* build in this case. 'XX' stands for the most common file * build in this case. 'XX' stands for the most common file
* extension of the file format. E.g.: * extension of the file format. E.g.:
* ASSIMP_BUILD_NO_X_IMPORTER disables the X loader. * ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
* *
* If you're unsure about that, take a look at the implementation of the * If you're unsure about that, take a look at the implementation of the
@ -59,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* first lines of the corresponding unit. * first lines of the corresponding unit.
* *
* Other (mixed) configuration switches are listed here: * Other (mixed) configuration switches are listed here:
* ASSIMP_BUILD_NO_COMPRESSED_X * ASSIMP_BUILD_NO_COMPRESSED_X
* - Disable support for compressed X files (zip) * - Disable support for compressed X files (zip)
* ASSIMP_BUILD_NO_COMPRESSED_BLEND * ASSIMP_BUILD_NO_COMPRESSED_BLEND
* - Disable support for compressed Blender files (zip) * - Disable support for compressed Blender files (zip)
@ -137,7 +137,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define ASSIMP_API __declspec(dllimport) # define ASSIMP_API __declspec(dllimport)
# define ASSIMP_API_WINONLY __declspec(dllimport) # define ASSIMP_API_WINONLY __declspec(dllimport)
# else # else
# define ASSIMP_API # define ASSIMP_API
# define ASSIMP_API_WINONLY # define ASSIMP_API_WINONLY
# endif # endif
@ -154,7 +154,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Do nothing, the relevant defines are all in AssimpSwigPort.i */ /* Do nothing, the relevant defines are all in AssimpSwigPort.i */
#else #else
# define AI_WONT_RETURN # define AI_WONT_RETURN
# define ASSIMP_API __attribute__ ((visibility("default"))) # define ASSIMP_API __attribute__ ((visibility("default")))
@ -185,8 +185,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MACRO_EXPANSION = YES MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES SEARCH_INCLUDES = YES
INCLUDE_PATH = INCLUDE_PATH =
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
PREDEFINED = ASSIMP_DOXYGEN_BUILD=1 PREDEFINED = ASSIMP_DOXYGEN_BUILD=1
EXPAND_AS_DEFINED = C_STRUCT C_ENUM EXPAND_AS_DEFINED = C_STRUCT C_ENUM
SKIP_FUNCTION_MACROS = YES SKIP_FUNCTION_MACROS = YES
@ -198,8 +198,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* to typedef all structs/enums. */ * to typedef all structs/enums. */
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
# if (defined ASSIMP_DOXYGEN_BUILD) # if (defined ASSIMP_DOXYGEN_BUILD)
# define C_STRUCT # define C_STRUCT
# define C_ENUM # define C_ENUM
# else # else
# define C_STRUCT struct # define C_STRUCT struct
# define C_ENUM enum # define C_ENUM enum
@ -216,7 +216,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Define 'ASSIMP_BUILD_BOOST_WORKAROUND' to compile assimp /* Define 'ASSIMP_BUILD_BOOST_WORKAROUND' to compile assimp
* without boost. This is done by using a few workaround * without boost. This is done by using a few workaround
* classes and brings some limitations (e.g. some logging won't be done, * classes and brings some limitations (e.g. some logging won't be done,
* the library won't utilize threads or be threadsafe at all). * the library won't utilize threads or be threadsafe at all).
* This implies the 'ASSIMP_BUILD_SINGLETHREADED' setting. */ * This implies the 'ASSIMP_BUILD_SINGLETHREADED' setting. */
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
#ifdef ASSIMP_BUILD_BOOST_WORKAROUND #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
@ -262,7 +262,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Support for big-endian builds */ /* Support for big-endian builds */
#if defined(__BYTE_ORDER__) #if defined(__BYTE_ORDER__)
# if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) # if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
# if !defined(__BIG_ENDIAN__) # if !defined(__BIG_ENDIAN__)
# define __BIG_ENDIAN__ # define __BIG_ENDIAN__
# endif # endif

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** Mixed set of flags for #aiImporterDesc, indicating some features /** Mixed set of flags for #aiImporterDesc, indicating some features
* common to many importers*/ * common to many importers*/
enum aiImporterFlags enum aiImporterFlags
{ {
/** Indicates that there is a textual encoding of the /** Indicates that there is a textual encoding of the
* file format; and that it is supported.*/ * file format; and that it is supported.*/
@ -77,14 +77,14 @@ enum aiImporterFlags
/** Meta information about a particular importer. Importers need to fill /** Meta information about a particular importer. Importers need to fill
* this structure, but they can freely decide how talkative they are. * this structure, but they can freely decide how talkative they are.
* A common use case for loader meta info is a user interface * A common use case for loader meta info is a user interface
* in which the user can choose between various import/export file * in which the user can choose between various import/export file
* formats. Building such an UI by hand means a lot of maintenance * formats. Building such an UI by hand means a lot of maintenance
* as importers/exporters are added to Assimp, so it might be useful * as importers/exporters are added to Assimp, so it might be useful
* to have a common mechanism to query some rough importer * to have a common mechanism to query some rough importer
* characteristics. */ * characteristics. */
struct aiImporterDesc struct aiImporterDesc
{ {
/** Full name of the importer (i.e. Blender3D importer)*/ /** Full name of the importer (i.e. Blender3D importer)*/
const char* mName; const char* mName;
@ -103,15 +103,15 @@ struct aiImporterDesc
unsigned int mFlags; unsigned int mFlags;
/** Minimum format version that can be loaded im major.minor format, /** Minimum format version that can be loaded im major.minor format,
both are set to 0 if there is either no version scheme both are set to 0 if there is either no version scheme
or if the loader doesn't care. */ or if the loader doesn't care. */
unsigned int mMinMajor; unsigned int mMinMajor;
unsigned int mMinMinor; unsigned int mMinMinor;
/** Maximum format version that can be loaded im major.minor format, /** Maximum format version that can be loaded im major.minor format,
both are set to 0 if there is either no version scheme both are set to 0 if there is either no version scheme
or if the loader doesn't care. Loaders that expect to be or if the loader doesn't care. Loaders that expect to be
forward-compatible to potential future format versions should forward-compatible to potential future format versions should
indicate zero, otherwise they should specify the current indicate zero, otherwise they should specify the current
maximum version.*/ maximum version.*/
unsigned int mMaxMajor; unsigned int mMaxMajor;
@ -140,4 +140,4 @@ Will return a NULL-pointer if no assigned importer desc. was found for the given
*/ */
ASSIMP_API const C_STRUCT aiImporterDesc* aiGetImporterDesc( const char *extension ); ASSIMP_API const C_STRUCT aiImporterDesc* aiGetImporterDesc( const char *extension );
#endif #endif

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -60,7 +60,7 @@ enum aiLightSourceType
aiLightSource_UNDEFINED = 0x0, aiLightSource_UNDEFINED = 0x0,
//! A directional light source has a well-defined direction //! A directional light source has a well-defined direction
//! but is infinitely far away. That's quite a good //! but is infinitely far away. That's quite a good
//! approximation for sun light. //! approximation for sun light.
aiLightSource_DIRECTIONAL = 0x1, aiLightSource_DIRECTIONAL = 0x1,
@ -69,7 +69,7 @@ enum aiLightSourceType
//! directions. A normal bulb is a point light. //! directions. A normal bulb is a point light.
aiLightSource_POINT = 0x2, aiLightSource_POINT = 0x2,
//! A spot light source emits light in a specific //! A spot light source emits light in a specific
//! angle. It has a position and a direction it is pointing to. //! angle. It has a position and a direction it is pointing to.
//! A good example for a spot light is a light spot in //! A good example for a spot light is a light spot in
//! sport arenas. //! sport arenas.
@ -79,7 +79,7 @@ enum aiLightSourceType
//! of all other lightsources. //! of all other lightsources.
//! Typically, there's at most one ambient light in a scene. //! Typically, there's at most one ambient light in a scene.
//! This light type doesn't have a valid position, direction, or //! This light type doesn't have a valid position, direction, or
//! other properties, just a color. //! other properties, just a color.
aiLightSource_AMBIENT = 0x4, aiLightSource_AMBIENT = 0x4,
@ -135,7 +135,7 @@ struct aiLight
*/ */
C_STRUCT aiVector3D mDirection; C_STRUCT aiVector3D mDirection;
/** Constant light attenuation factor. /** Constant light attenuation factor.
* *
* The intensity of the light source at a given distance 'd' from * The intensity of the light source at a given distance 'd' from
* the light's position is * the light's position is
@ -147,7 +147,7 @@ struct aiLight
*/ */
float mAttenuationConstant; float mAttenuationConstant;
/** Linear light attenuation factor. /** Linear light attenuation factor.
* *
* The intensity of the light source at a given distance 'd' from * The intensity of the light source at a given distance 'd' from
* the light's position is * the light's position is
@ -159,8 +159,8 @@ struct aiLight
*/ */
float mAttenuationLinear; float mAttenuationLinear;
/** Quadratic light attenuation factor. /** Quadratic light attenuation factor.
* *
* The intensity of the light source at a given distance 'd' from * The intensity of the light source at a given distance 'd' from
* the light's position is * the light's position is
* @code * @code
@ -173,7 +173,7 @@ struct aiLight
/** Diffuse color of the light source /** Diffuse color of the light source
* *
* The diffuse light color is multiplied with the diffuse * The diffuse light color is multiplied with the diffuse
* material color to obtain the final color that contributes * material color to obtain the final color that contributes
* to the diffuse shading term. * to the diffuse shading term.
*/ */
@ -200,7 +200,7 @@ struct aiLight
/** Inner angle of a spot light's light cone. /** Inner angle of a spot light's light cone.
* *
* The spot light has maximum influence on objects inside this * The spot light has maximum influence on objects inside this
* angle. The angle is given in radians. It is 2PI for point * angle. The angle is given in radians. It is 2PI for point
* lights and undefined for directional lights. * lights and undefined for directional lights.
*/ */
float mAngleInnerCone; float mAngleInnerCone;
@ -208,12 +208,12 @@ struct aiLight
/** Outer angle of a spot light's light cone. /** Outer angle of a spot light's light cone.
* *
* The spot light does not affect objects outside this angle. * The spot light does not affect objects outside this angle.
* The angle is given in radians. It is 2PI for point lights and * The angle is given in radians. It is 2PI for point lights and
* undefined for directional lights. The outer angle must be * undefined for directional lights. The outer angle must be
* greater than or equal to the inner angle. * greater than or equal to the inner angle.
* It is assumed that the application uses a smooth * It is assumed that the application uses a smooth
* interpolation between the inner and the outer cone of the * interpolation between the inner and the outer cone of the
* spot light. * spot light.
*/ */
float mAngleOuterCone; float mAngleOuterCone;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -67,9 +67,9 @@ extern "C" {
* DiffTextureOp0 - aiTextureOpAdd * DiffTextureOp0 - aiTextureOpAdd
* DiffTexture1 - tex2.png * DiffTexture1 - tex2.png
* @endcode * @endcode
* Written as equation, the final diffuse term for a specific pixel would be: * Written as equation, the final diffuse term for a specific pixel would be:
* @code * @code
* diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) + * diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) +
* sampleTex(DiffTexture1,UV0) * diffContrib; * sampleTex(DiffTexture1,UV0) * diffContrib;
* @endcode * @endcode
* where 'diffContrib' is the intensity of the incoming light for that pixel. * where 'diffContrib' is the intensity of the incoming light for that pixel.
@ -107,7 +107,7 @@ enum aiTextureOp
*/ */
enum aiTextureMapMode enum aiTextureMapMode
{ {
/** A texture coordinate u|v is translated to u%1|v%1 /** A texture coordinate u|v is translated to u%1|v%1
*/ */
aiTextureMapMode_Wrap = 0x0, aiTextureMapMode_Wrap = 0x0,
@ -146,7 +146,7 @@ enum aiTextureMapping
* *
* The #AI_MATKEY_UVWSRC key specifies from which UV channel * The #AI_MATKEY_UVWSRC key specifies from which UV channel
* the texture coordinates are to be taken from (remember, * the texture coordinates are to be taken from (remember,
* meshes can have more than one UV channel). * meshes can have more than one UV channel).
*/ */
aiTextureMapping_UV = 0x0, aiTextureMapping_UV = 0x0,
@ -172,16 +172,16 @@ enum aiTextureMapping
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Defines the purpose of a texture /** @brief Defines the purpose of a texture
* *
* This is a very difficult topic. Different 3D packages support different * This is a very difficult topic. Different 3D packages support different
* kinds of textures. For very common texture types, such as bumpmaps, the * kinds of textures. For very common texture types, such as bumpmaps, the
* rendering results depend on implementation details in the rendering * rendering results depend on implementation details in the rendering
* pipelines of these applications. Assimp loads all texture references from * pipelines of these applications. Assimp loads all texture references from
* the model file and tries to determine which of the predefined texture * the model file and tries to determine which of the predefined texture
* types below is the best choice to match the original use of the texture * types below is the best choice to match the original use of the texture
* as closely as possible.<br> * as closely as possible.<br>
* *
* In content pipelines you'll usually define how textures have to be handled, * In content pipelines you'll usually define how textures have to be handled,
* and the artists working on models have to conform to this specification, * and the artists working on models have to conform to this specification,
* regardless which 3D tool they're using. * regardless which 3D tool they're using.
@ -190,8 +190,8 @@ enum aiTextureType
{ {
/** Dummy value. /** Dummy value.
* *
* No texture, but the value to be used as 'texture semantic' * No texture, but the value to be used as 'texture semantic'
* (#aiMaterialProperty::mSemantic) for all material properties * (#aiMaterialProperty::mSemantic) for all material properties
* *not* related to textures. * *not* related to textures.
*/ */
aiTextureType_NONE = 0x0, aiTextureType_NONE = 0x0,
@ -228,7 +228,7 @@ enum aiTextureType
/** The texture is a (tangent space) normal-map. /** The texture is a (tangent space) normal-map.
* *
* Again, there are several conventions for tangent-space * Again, there are several conventions for tangent-space
* normal maps. Assimp does (intentionally) not * normal maps. Assimp does (intentionally) not
* distinguish here. * distinguish here.
*/ */
aiTextureType_NORMALS = 0x6, aiTextureType_NORMALS = 0x6,
@ -244,7 +244,7 @@ enum aiTextureType
/** The texture defines per-pixel opacity. /** The texture defines per-pixel opacity.
* *
* Usually 'white' means opaque and 'black' means * Usually 'white' means opaque and 'black' means
* 'transparency'. Or quite the opposite. Have fun. * 'transparency'. Or quite the opposite. Have fun.
*/ */
aiTextureType_OPACITY = 0x8, aiTextureType_OPACITY = 0x8,
@ -274,7 +274,7 @@ enum aiTextureType
/** Unknown texture /** Unknown texture
* *
* A texture reference that does not match any of the definitions * A texture reference that does not match any of the definitions
* above is considered to be 'unknown'. It is still imported, * above is considered to be 'unknown'. It is still imported,
* but is excluded from any further postprocessing. * but is excluded from any further postprocessing.
*/ */
@ -302,12 +302,12 @@ enum aiTextureType
*/ */
enum aiShadingMode enum aiShadingMode
{ {
/** Flat shading. Shading is done on per-face base, /** Flat shading. Shading is done on per-face base,
* diffuse only. Also known as 'faceted shading'. * diffuse only. Also known as 'faceted shading'.
*/ */
aiShadingMode_Flat = 0x1, aiShadingMode_Flat = 0x1,
/** Simple Gouraud shading. /** Simple Gouraud shading.
*/ */
aiShadingMode_Gouraud = 0x2, aiShadingMode_Gouraud = 0x2,
@ -365,8 +365,8 @@ enum aiShadingMode
* *
* Usually you'll instruct your cg artists how textures have to look like ... * Usually you'll instruct your cg artists how textures have to look like ...
* and how they will be processed in your application. However, if you use * and how they will be processed in your application. However, if you use
* Assimp for completely generic loading purposes you might also need to * Assimp for completely generic loading purposes you might also need to
* process these flags in order to display as many 'unknown' 3D models as * process these flags in order to display as many 'unknown' 3D models as
* possible correctly. * possible correctly.
* *
* This corresponds to the #AI_MATKEY_TEXFLAGS property. * This corresponds to the #AI_MATKEY_TEXFLAGS property.
@ -391,10 +391,10 @@ enum aiTextureFlags
/** Explicit request to the application to ignore the alpha channel /** Explicit request to the application to ignore the alpha channel
* of the texture. * of the texture.
* *
* Mutually exclusive with #aiTextureFlags_UseAlpha. * Mutually exclusive with #aiTextureFlags_UseAlpha.
*/ */
aiTextureFlags_IgnoreAlpha = 0x4, aiTextureFlags_IgnoreAlpha = 0x4,
#ifndef SWIG #ifndef SWIG
_aiTextureFlags_Force32Bit = INT_MAX _aiTextureFlags_Force32Bit = INT_MAX
#endif #endif
@ -419,7 +419,7 @@ enum aiTextureFlags
*/ */
enum aiBlendMode enum aiBlendMode
{ {
/** /**
* Formula: * Formula:
* @code * @code
* SourceColor*SourceAlpha + DestColor*(1-SourceAlpha) * SourceColor*SourceAlpha + DestColor*(1-SourceAlpha)
@ -451,7 +451,7 @@ enum aiBlendMode
/** @brief Defines how an UV channel is transformed. /** @brief Defines how an UV channel is transformed.
* *
* This is just a helper structure for the #AI_MATKEY_UVTRANSFORM key. * This is just a helper structure for the #AI_MATKEY_UVTRANSFORM key.
* See its documentation for more details. * See its documentation for more details.
* *
* Typically you'll want to build a matrix of this information. However, * Typically you'll want to build a matrix of this information. However,
* we keep separate scaling/translation/rotation values to make it * we keep separate scaling/translation/rotation values to make it
@ -459,13 +459,13 @@ enum aiBlendMode
*/ */
struct aiUVTransform struct aiUVTransform
{ {
/** Translation on the u and v axes. /** Translation on the u and v axes.
* *
* The default value is (0|0). * The default value is (0|0).
*/ */
C_STRUCT aiVector2D mTranslation; C_STRUCT aiVector2D mTranslation;
/** Scaling on the u and v axes. /** Scaling on the u and v axes.
* *
* The default value is (1|1). * The default value is (1|1).
*/ */
@ -495,30 +495,30 @@ struct aiUVTransform
//! @cond AI_DOX_INCLUDE_INTERNAL //! @cond AI_DOX_INCLUDE_INTERNAL
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief A very primitive RTTI system for the contents of material /** @brief A very primitive RTTI system for the contents of material
* properties. * properties.
*/ */
enum aiPropertyTypeInfo enum aiPropertyTypeInfo
{ {
/** Array of single-precision (32 Bit) floats /** Array of single-precision (32 Bit) floats
* *
* It is possible to use aiGetMaterialInteger[Array]() (or the C++-API * It is possible to use aiGetMaterialInteger[Array]() (or the C++-API
* aiMaterial::Get()) to query properties stored in floating-point format. * aiMaterial::Get()) to query properties stored in floating-point format.
* The material system performs the type conversion automatically. * The material system performs the type conversion automatically.
*/ */
aiPTI_Float = 0x1, aiPTI_Float = 0x1,
/** The material property is an aiString. /** The material property is an aiString.
* *
* Arrays of strings aren't possible, aiGetMaterialString() (or the * Arrays of strings aren't possible, aiGetMaterialString() (or the
* C++-API aiMaterial::Get()) *must* be used to query a string property. * C++-API aiMaterial::Get()) *must* be used to query a string property.
*/ */
aiPTI_String = 0x3, aiPTI_String = 0x3,
/** Array of (32 Bit) integers /** Array of (32 Bit) integers
* *
* It is possible to use aiGetMaterialFloat[Array]() (or the C++-API * It is possible to use aiGetMaterialFloat[Array]() (or the C++-API
* aiMaterial::Get()) to query properties stored in integer format. * aiMaterial::Get()) to query properties stored in integer format.
* The material system performs the type conversion automatically. * The material system performs the type conversion automatically.
*/ */
aiPTI_Integer = 0x4, aiPTI_Integer = 0x4,
@ -542,7 +542,7 @@ enum aiPropertyTypeInfo
* *
* As an user, you'll probably never need to deal with this data structure. * As an user, you'll probably never need to deal with this data structure.
* Just use the provided aiGetMaterialXXX() or aiMaterial::Get() family * Just use the provided aiGetMaterialXXX() or aiMaterial::Get() family
* of functions to query material properties easily. Processing them * of functions to query material properties easily. Processing them
* manually is faster, but it is not the recommended way. It isn't worth * manually is faster, but it is not the recommended way. It isn't worth
* the effort. <br> * the effort. <br>
* Material property names follow a simple scheme: * Material property names follow a simple scheme:
@ -550,22 +550,22 @@ enum aiPropertyTypeInfo
* $<name> * $<name>
* ?<name> * ?<name>
* A public property, there must be corresponding AI_MATKEY_XXX define * A public property, there must be corresponding AI_MATKEY_XXX define
* 2nd: Public, but ignored by the #aiProcess_RemoveRedundantMaterials * 2nd: Public, but ignored by the #aiProcess_RemoveRedundantMaterials
* post-processing step. * post-processing step.
* ~<name> * ~<name>
* A temporary property for internal use. * A temporary property for internal use.
* @endcode * @endcode
* @see aiMaterial * @see aiMaterial
*/ */
struct aiMaterialProperty struct aiMaterialProperty
{ {
/** Specifies the name of the property (key) /** Specifies the name of the property (key)
* Keys are generally case insensitive. * Keys are generally case insensitive.
*/ */
C_STRUCT aiString mKey; C_STRUCT aiString mKey;
/** Textures: Specifies their exact usage semantic. /** Textures: Specifies their exact usage semantic.
* For non-texture properties, this member is always 0 * For non-texture properties, this member is always 0
* (or, better-said, #aiTextureType_NONE). * (or, better-said, #aiTextureType_NONE).
*/ */
unsigned int mSemantic; unsigned int mSemantic;
@ -583,8 +583,8 @@ struct aiMaterialProperty
/** Type information for the property. /** Type information for the property.
* *
* Defines the data layout inside the data buffer. This is used * Defines the data layout inside the data buffer. This is used
* by the library internally to perform debug checks and to * by the library internally to perform debug checks and to
* utilize proper type conversions. * utilize proper type conversions.
* (It's probably a hacky solution, but it works.) * (It's probably a hacky solution, but it works.)
*/ */
C_ENUM aiPropertyTypeInfo mType; C_ENUM aiPropertyTypeInfo mType;
@ -641,15 +641,15 @@ public:
~aiMaterial(); ~aiMaterial();
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Retrieve an array of Type values with a specific key /** @brief Retrieve an array of Type values with a specific key
* from the material * from the material
* *
* @param pKey Key to search for. One of the AI_MATKEY_XXX constants. * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
* @param type .. set by AI_MATKEY_XXX * @param type .. set by AI_MATKEY_XXX
* @param idx .. set by AI_MATKEY_XXX * @param idx .. set by AI_MATKEY_XXX
* @param pOut Pointer to a buffer to receive the result. * @param pOut Pointer to a buffer to receive the result.
* @param pMax Specifies the size of the given buffer, in Type's. * @param pMax Specifies the size of the given buffer, in Type's.
* Receives the number of values (not bytes!) read. * Receives the number of values (not bytes!) read.
* NULL is a valid value for this parameter. * NULL is a valid value for this parameter.
*/ */
template <typename Type> template <typename Type>
@ -663,7 +663,7 @@ public:
unsigned int idx, float* pOut, unsigned int* pMax) const; unsigned int idx, float* pOut, unsigned int* pMax) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Retrieve a Type value with a specific key /** @brief Retrieve a Type value with a specific key
* from the material * from the material
* *
* @param pKey Key to search for. One of the AI_MATKEY_XXX constants. * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
@ -703,7 +703,7 @@ public:
unsigned int GetTextureCount(aiTextureType type) const; unsigned int GetTextureCount(aiTextureType type) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Helper function to get all parameters pertaining to a /** Helper function to get all parameters pertaining to a
* particular texture slot from a material. * particular texture slot from a material.
* *
* This function is provided just for convenience, you could also * This function is provided just for convenience, you could also
@ -711,14 +711,14 @@ public:
* @param type Specifies the type of the texture to be retrieved ( * @param type Specifies the type of the texture to be retrieved (
* e.g. diffuse, specular, height map ...) * e.g. diffuse, specular, height map ...)
* @param index Index of the texture to be retrieved. The function fails * @param index Index of the texture to be retrieved. The function fails
* if there is no texture of that type with this index. * if there is no texture of that type with this index.
* #GetTextureCount() can be used to determine the number of textures * #GetTextureCount() can be used to determine the number of textures
* per texture type. * per texture type.
* @param path Receives the path to the texture. * @param path Receives the path to the texture.
* NULL is a valid value. * NULL is a valid value.
* @param mapping The texture mapping. * @param mapping The texture mapping.
* NULL is allowed as value. * NULL is allowed as value.
* @param uvindex Receives the UV index of the texture. * @param uvindex Receives the UV index of the texture.
* NULL is a valid value. * NULL is a valid value.
* @param blend Receives the blend factor for the texture * @param blend Receives the blend factor for the texture
* NULL is a valid value. * NULL is a valid value.
@ -727,7 +727,7 @@ public:
* @param mapmode Receives the mapping modes to be used for the texture. * @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 * 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 * point to an array of 3 aiTextureMapMode's (one for each
* axis: UVW order (=XYZ)). * axis: UVW order (=XYZ)).
*/ */
// ------------------------------------------------------------------- // -------------------------------------------------------------------
aiReturn GetTexture(aiTextureType type, aiReturn GetTexture(aiTextureType type,
@ -737,7 +737,7 @@ public:
unsigned int* uvindex = NULL, unsigned int* uvindex = NULL,
float* blend = NULL, float* blend = NULL,
aiTextureOp* op = NULL, aiTextureOp* op = NULL,
aiTextureMapMode* mapmode = NULL) const; aiTextureMapMode* mapmode = NULL) const;
// Setters // Setters
@ -745,7 +745,7 @@ public:
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
/** @brief 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 * structure
* *
* @param pInput Pointer to input data * @param pInput Pointer to input data
* @param pSizeInBytes Size of input data * @param pSizeInBytes Size of input data
@ -761,8 +761,8 @@ public:
aiPropertyTypeInfo pType); aiPropertyTypeInfo pType);
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
/** @brief 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 * material structure
* *
* @param pInput Input string * @param pInput Input string
* @param pKey Key/Usage of the property (AI_MATKEY_XXX) * @param pKey Key/Usage of the property (AI_MATKEY_XXX)
@ -774,7 +774,7 @@ public:
unsigned int index = 0); unsigned int index = 0);
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
/** @brief Add a property with a given key to the material structure /** @brief Add a property with a given key to the material structure
* @param pInput Pointer to the input data * @param pInput Pointer to the input data
* @param pNumValues Number of values in the array * @param pNumValues Number of values in the array
* @param pKey Key/Usage of the property (AI_MATKEY_XXX) * @param pKey Key/Usage of the property (AI_MATKEY_XXX)
@ -827,7 +827,7 @@ public:
/** @brief Remove a given key from the list. /** @brief Remove a given key from the list.
* *
* The function fails if the key isn't found * The function fails if the key isn't found
* @param pKey Key to be deleted * @param pKey Key to be deleted
* @param type Set by the AI_MATKEY_XXX macro * @param type Set by the AI_MATKEY_XXX macro
* @param index Set by the AI_MATKEY_XXX macro */ * @param index Set by the AI_MATKEY_XXX macro */
aiReturn RemoveProperty (const char* pKey, aiReturn RemoveProperty (const char* pKey,
@ -845,7 +845,7 @@ public:
* @param pcDest Destination material * @param pcDest Destination material
* @param pcSrc Source material * @param pcSrc Source material
*/ */
static void CopyPropertyList(aiMaterial* pcDest, static void CopyPropertyList(aiMaterial* pcDest,
const aiMaterial* pcSrc); const aiMaterial* pcSrc);
@ -1311,14 +1311,14 @@ extern "C" {
* structure or NULL if the key has not been found. */ * structure or NULL if the key has not been found. */
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty( ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty(
const C_STRUCT aiMaterial* pMat, const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
const C_STRUCT aiMaterialProperty** pPropOut); const C_STRUCT aiMaterialProperty** pPropOut);
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Retrieve an array of float values with a specific key /** @brief Retrieve an array of float values with a specific key
* from the material * from the material
* *
* Pass one of the AI_MATKEY_XXX constants for the last three parameters (the * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
@ -1329,22 +1329,22 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty(
* if (AI_SUCCESS != aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,0), * if (AI_SUCCESS != aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,0),
* (float*)&trafo, &max) || sizeof(aiUVTransform) != max) * (float*)&trafo, &max) || sizeof(aiUVTransform) != max)
* { * {
* // error handling * // error handling
* } * }
* @endcode * @endcode
* *
* @param pMat Pointer to the input material. May not be NULL * @param pMat Pointer to the input material. May not be NULL
* @param pKey Key to search for. One of the AI_MATKEY_XXX constants. * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
* @param pOut Pointer to a buffer to receive the result. * @param pOut Pointer to a buffer to receive the result.
* @param pMax Specifies the size of the given buffer, in float's. * @param pMax Specifies the size of the given buffer, in float's.
* Receives the number of values (not bytes!) read. * Receives the number of values (not bytes!) read.
* @param type (see the code sample above) * @param type (see the code sample above)
* @param index (see the code sample above) * @param index (see the code sample above)
* @return Specifies whether the key has been found. If not, the output * @return Specifies whether the key has been found. If not, the output
* arrays remains unmodified and pMax is set to 0.*/ * arrays remains unmodified and pMax is set to 0.*/
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray( ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
const C_STRUCT aiMaterial* pMat, const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1373,7 +1373,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
* @return Specifies whether the key has been found. If not, the output * @return Specifies whether the key has been found. If not, the output
* float remains unmodified.*/ * float remains unmodified.*/
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat, inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1382,7 +1382,7 @@ inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
return aiGetMaterialFloatArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0); return aiGetMaterialFloatArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0);
} }
#else #else
// Use our friend, the C preprocessor // Use our friend, the C preprocessor
#define aiGetMaterialFloat (pMat, type, index, pKey, pOut) \ #define aiGetMaterialFloat (pMat, type, index, pKey, pOut) \
@ -1392,11 +1392,11 @@ inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Retrieve an array of integer values with a specific key /** @brief Retrieve an array of integer values with a specific key
* from a material * from a material
* *
* See the sample for aiGetMaterialFloatArray for more information.*/ * See the sample for aiGetMaterialFloatArray for more information.*/
ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat, ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1411,7 +1411,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial*
* *
* See the sample for aiGetMaterialFloat for more information.*/ * See the sample for aiGetMaterialFloat for more information.*/
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat, inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1420,7 +1420,7 @@ inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
return aiGetMaterialIntegerArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0); return aiGetMaterialIntegerArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0);
} }
#else #else
// use our friend, the C preprocessor // use our friend, the C preprocessor
#define aiGetMaterialInteger (pMat, type, index, pKey, pOut) \ #define aiGetMaterialInteger (pMat, type, index, pKey, pOut) \
@ -1435,7 +1435,7 @@ inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
* *
* See the sample for aiGetMaterialFloat for more information*/ * See the sample for aiGetMaterialFloat for more information*/
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat, ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1447,7 +1447,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
* *
* See the sample for aiGetMaterialFloat for more information*/ * See the sample for aiGetMaterialFloat for more information*/
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* pMat, ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1459,7 +1459,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* p
* *
* See the sample for aiGetMaterialFloat for more information.*/ * See the sample for aiGetMaterialFloat for more information.*/
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat, ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
const char* pKey, const char* pKey,
unsigned int type, unsigned int type,
unsigned int index, unsigned int index,
@ -1472,7 +1472,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
* @return Number of textures for this type. * @return Number of textures for this type.
* @note A texture can be easily queried using #aiGetMaterialTexture() */ * @note A texture can be easily queried using #aiGetMaterialTexture() */
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMat, ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMat,
C_ENUM aiTextureType type); C_ENUM aiTextureType type);
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -1485,9 +1485,9 @@ ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMa
* *
* @param[in] mat Pointer to the input material. May not be NULL * @param[in] mat Pointer to the input material. May not be NULL
* @param[in] type Specifies the texture stack to read from (e.g. diffuse, * @param[in] type Specifies the texture stack to read from (e.g. diffuse,
* specular, height map ...). * specular, height map ...).
* @param[in] index Index of the texture. The function fails if the * @param[in] index Index of the texture. The function fails if the
* requested index is not available for this texture type. * requested index is not available for this texture type.
* #aiGetMaterialTextureCount() can be used to determine the number of * #aiGetMaterialTextureCount() can be used to determine the number of
* textures in a particular texture stack. * textures in a particular texture stack.
* @param[out] path Receives the output path * @param[out] path Receives the output path
@ -1519,7 +1519,7 @@ ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
float* blend = NULL, float* blend = NULL,
aiTextureOp* op = NULL, aiTextureOp* op = NULL,
aiTextureMapMode* mapmode = NULL, aiTextureMapMode* mapmode = NULL,
unsigned int* flags = NULL); unsigned int* flags = NULL);
#else #else
C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat, C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
C_ENUM aiTextureType type, C_ENUM aiTextureType type,
@ -1530,7 +1530,7 @@ C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
float* blend /*= NULL*/, float* blend /*= NULL*/,
C_ENUM aiTextureOp* op /*= NULL*/, C_ENUM aiTextureOp* op /*= NULL*/,
C_ENUM aiTextureMapMode* mapmode /*= NULL*/, C_ENUM aiTextureMapMode* mapmode /*= NULL*/,
unsigned int* flags /*= NULL*/); unsigned int* flags /*= NULL*/);
#endif // !#ifdef __cplusplus #endif // !#ifdef __cplusplus
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -55,7 +55,7 @@ template <typename T> class aiVector2t;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Represents a row-major 3x3 matrix /** @brief Represents a row-major 3x3 matrix
* *
* There's much confusion about matrix layouts (column vs. row order). * There's much confusion about matrix layouts (column vs. row order).
* This is *always* a row-major matrix. Not even with the * This is *always* a row-major matrix. Not even with the
* #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect * #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect
* matrix order - it just affects the handedness of the coordinate system * matrix order - it just affects the handedness of the coordinate system
@ -66,22 +66,22 @@ class aiMatrix3x3t
{ {
public: public:
aiMatrix3x3t () : aiMatrix3x3t () :
a1(static_cast<TReal>(1.0f)), a2(), a3(), a1(static_cast<TReal>(1.0f)), a2(), a3(),
b1(), b2(static_cast<TReal>(1.0f)), b3(), b1(), b2(static_cast<TReal>(1.0f)), b3(),
c1(), c2(), c3(static_cast<TReal>(1.0f)) {} c1(), c2(), c3(static_cast<TReal>(1.0f)) {}
aiMatrix3x3t ( TReal _a1, TReal _a2, TReal _a3, aiMatrix3x3t ( TReal _a1, TReal _a2, TReal _a3,
TReal _b1, TReal _b2, TReal _b3, TReal _b1, TReal _b2, TReal _b3,
TReal _c1, TReal _c2, TReal _c3) : TReal _c1, TReal _c2, TReal _c3) :
a1(_a1), a2(_a2), a3(_a3), a1(_a1), a2(_a2), a3(_a3),
b1(_b1), b2(_b2), b3(_b3), b1(_b1), b2(_b2), b3(_b3),
c1(_c1), c2(_c2), c3(_c3) c1(_c1), c2(_c2), c3(_c3)
{} {}
public: public:
// matrix multiplication. // matrix multiplication.
aiMatrix3x3t& operator *= (const aiMatrix3x3t& m); aiMatrix3x3t& operator *= (const aiMatrix3x3t& m);
aiMatrix3x3t operator * (const aiMatrix3x3t& m) const; aiMatrix3x3t operator * (const aiMatrix3x3t& m) const;
@ -101,7 +101,7 @@ public:
public: public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Construction from a 4x4 matrix. The remaining parts /** @brief Construction from a 4x4 matrix. The remaining parts
* of the matrix are ignored. * of the matrix are ignored.
*/ */
explicit aiMatrix3x3t( const aiMatrix4x4t<TReal>& pMatrix); explicit aiMatrix3x3t( const aiMatrix4x4t<TReal>& pMatrix);
@ -136,11 +136,11 @@ public:
* @param axis Axis to rotate around * @param axis Axis to rotate around
* @param out To be filled * @param out To be filled
*/ */
static aiMatrix3x3t& Rotation( TReal a, static aiMatrix3x3t& Rotation( TReal a,
const aiVector3t<TReal>& axis, aiMatrix3x3t& out); const aiVector3t<TReal>& axis, aiMatrix3x3t& out);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Returns a translation matrix /** @brief Returns a translation matrix
* @param v Translation vector * @param v Translation vector
* @param out Receives the output matrix * @param out Receives the output matrix
* @return Reference to the output matrix * @return Reference to the output matrix
@ -156,7 +156,7 @@ public:
* "Efficiently Building a Matrix to Rotate One Vector to Another" * "Efficiently Building a Matrix to Rotate One Vector to Another"
* Journal of Graphics Tools, 4(4):1-4, 1999 * Journal of Graphics Tools, 4(4):1-4, 1999
*/ */
static aiMatrix3x3t& FromToMatrix(const aiVector3t<TReal>& from, static aiMatrix3x3t& FromToMatrix(const aiVector3t<TReal>& from,
const aiVector3t<TReal>& to, aiMatrix3x3t& out); const aiVector3t<TReal>& to, aiMatrix3x3t& out);
public: public:

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -167,10 +167,10 @@ inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::Inverse()
{ {
// Compute the reciprocal determinant // Compute the reciprocal determinant
TReal det = Determinant(); TReal det = Determinant();
if(det == static_cast<TReal>(0.0)) if(det == static_cast<TReal>(0.0))
{ {
// Matrix not invertible. Setting all elements to nan is not really // Matrix not invertible. Setting all elements to nan is not really
// correct in a mathematical sense; but at least qnans are easy to // correct in a mathematical sense; but at least qnans are easy to
// spot. XXX we might throw an exception instead, which would // spot. XXX we might throw an exception instead, which would
// be even much better to spot :/. // be even much better to spot :/.
const TReal nan = std::numeric_limits<TReal>::quiet_NaN(); const TReal nan = std::numeric_limits<TReal>::quiet_NaN();
@ -247,7 +247,7 @@ inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::Translation( const aiVector2t<T
*/ */
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::FromToMatrix(const aiVector3t<TReal>& from, inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::FromToMatrix(const aiVector3t<TReal>& from,
const aiVector3t<TReal>& to, aiMatrix3x3t<TReal>& mtx) const aiVector3t<TReal>& to, aiMatrix3x3t<TReal>& mtx)
{ {
const TReal e = from * to; const TReal e = from * to;
@ -292,9 +292,9 @@ inline aiMatrix3x3t<TReal>& aiMatrix3x3t<TReal>::FromToMatrix(const aiVector3t<T
const TReal c2 = static_cast<TReal>(2.0) / (v * v); const TReal c2 = static_cast<TReal>(2.0) / (v * v);
const TReal c3 = c1 * c2 * (u * v); const TReal c3 = c1 * c2 * (u * v);
for (unsigned int i = 0; i < 3; i++) for (unsigned int i = 0; i < 3; i++)
{ {
for (unsigned int j = 0; j < 3; j++) for (unsigned int j = 0; j < 3; j++)
{ {
mtx[i][j] = - c1 * u[i] * u[j] - c2 * v[i] * v[j] mtx[i][j] = - c1 * u[i] * u[j] - c2 * v[i] * v[j]
+ c3 * v[i] * u[j]; + c3 * v[i] * u[j];

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -56,7 +56,7 @@ template<typename TReal> class aiQuaterniont;
/** @brief Represents a row-major 4x4 matrix, use this for homogeneous /** @brief Represents a row-major 4x4 matrix, use this for homogeneous
* coordinates. * coordinates.
* *
* There's much confusion about matrix layouts (column vs. row order). * There's much confusion about matrix layouts (column vs. row order).
* This is *always* a row-major matrix. Not even with the * This is *always* a row-major matrix. Not even with the
* #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect * #aiProcess_ConvertToLeftHanded flag, which absolutely does not affect
* matrix order - it just affects the handedness of the coordinate system * matrix order - it just affects the handedness of the coordinate system
@ -66,7 +66,7 @@ template<typename TReal>
class aiMatrix4x4t class aiMatrix4x4t
{ {
public: public:
/** set to identity */ /** set to identity */
aiMatrix4x4t (); aiMatrix4x4t ();
@ -79,10 +79,10 @@ public:
/** construction from 3x3 matrix, remaining elements are set to identity */ /** construction from 3x3 matrix, remaining elements are set to identity */
explicit aiMatrix4x4t( const aiMatrix3x3t<TReal>& m); explicit aiMatrix4x4t( const aiMatrix3x3t<TReal>& m);
/** construction from position, rotation and scaling components /** construction from position, rotation and scaling components
* @param scaling The scaling for the x,y,z axes * @param scaling The scaling for the x,y,z axes
* @param rotation The rotation as a hamilton quaternion * @param rotation The rotation as a hamilton quaternion
* @param position The position for the x,y,z axes * @param position The position for the x,y,z axes
*/ */
aiMatrix4x4t(const aiVector3t<TReal>& scaling, const aiQuaterniont<TReal>& rotation, aiMatrix4x4t(const aiVector3t<TReal>& scaling, const aiQuaterniont<TReal>& rotation,
@ -100,7 +100,7 @@ public:
bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const; bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const;
// matrix multiplication. // matrix multiplication.
aiMatrix4x4t& operator *= (const aiMatrix4x4t& m); aiMatrix4x4t& operator *= (const aiMatrix4x4t& m);
aiMatrix4x4t operator * (const aiMatrix4x4t& m) const; aiMatrix4x4t operator * (const aiMatrix4x4t& m) const;
@ -132,17 +132,17 @@ public:
/** @brief Decompose a trafo matrix into its original components /** @brief Decompose a trafo matrix into its original components
* @param scaling Receives the output scaling for the x,y,z axes * @param scaling Receives the output scaling for the x,y,z axes
* @param rotation Receives the output rotation as a hamilton * @param rotation Receives the output rotation as a hamilton
* quaternion * quaternion
* @param position Receives the output position for the x,y,z axes * @param position Receives the output position for the x,y,z axes
*/ */
void Decompose (aiVector3t<TReal>& scaling, aiQuaterniont<TReal>& rotation, void Decompose (aiVector3t<TReal>& scaling, aiQuaterniont<TReal>& rotation,
aiVector3t<TReal>& position) const; aiVector3t<TReal>& position) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Decompose a trafo matrix with no scaling into its /** @brief Decompose a trafo matrix with no scaling into its
* original components * original components
* @param rotation Receives the output rotation as a hamilton * @param rotation Receives the output rotation as a hamilton
* quaternion * quaternion
* @param position Receives the output position for the x,y,z axes * @param position Receives the output position for the x,y,z axes
*/ */
void DecomposeNoScaling (aiQuaterniont<TReal>& rotation, void DecomposeNoScaling (aiQuaterniont<TReal>& rotation,
@ -190,11 +190,11 @@ public:
* @param out Receives the output matrix * @param out Receives the output matrix
* @return Reference to the output matrix * @return Reference to the output matrix
*/ */
static aiMatrix4x4t& Rotation(TReal a, const aiVector3t<TReal>& axis, static aiMatrix4x4t& Rotation(TReal a, const aiVector3t<TReal>& axis,
aiMatrix4x4t& out); aiMatrix4x4t& out);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Returns a translation matrix /** @brief Returns a translation matrix
* @param v Translation vector * @param v Translation vector
* @param out Receives the output matrix * @param out Receives the output matrix
* @return Reference to the output matrix * @return Reference to the output matrix
@ -202,7 +202,7 @@ public:
static aiMatrix4x4t& Translation( const aiVector3t<TReal>& v, aiMatrix4x4t& out); static aiMatrix4x4t& Translation( const aiVector3t<TReal>& v, aiMatrix4x4t& out);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Returns a scaling matrix /** @brief Returns a scaling matrix
* @param v Scaling vector * @param v Scaling vector
* @param out Receives the output matrix * @param out Receives the output matrix
* @return Reference to the output matrix * @return Reference to the output matrix
@ -218,7 +218,7 @@ public:
* "Efficiently Building a Matrix to Rotate One Vector to Another" * "Efficiently Building a Matrix to Rotate One Vector to Another"
* Journal of Graphics Tools, 4(4):1-4, 1999 * Journal of Graphics Tools, 4(4):1-4, 1999
*/ */
static aiMatrix4x4t& FromToMatrix(const aiVector3t<TReal>& from, static aiMatrix4x4t& FromToMatrix(const aiVector3t<TReal>& from,
const aiVector3t<TReal>& to, aiMatrix4x4t& out); const aiVector3t<TReal>& to, aiMatrix4x4t& out);
public: public:
@ -228,7 +228,7 @@ public:
TReal c1, c2, c3, c4; TReal c1, c2, c3, c4;
TReal d1, d2, d3, d4; TReal d1, d2, d3, d4;
} PACK_STRUCT; } PACK_STRUCT;
typedef aiMatrix4x4t<float> aiMatrix4x4; typedef aiMatrix4x4t<float> aiMatrix4x4;

View File

@ -118,7 +118,7 @@ inline aiMatrix4x4t<TReal>::aiMatrix4x4t (const aiVector3t<TReal>& scaling, cons
b2 = m.b2 * scaling.y; b2 = m.b2 * scaling.y;
b3 = m.b3 * scaling.y; b3 = m.b3 * scaling.y;
b4 = position.y; b4 = position.y;
c1 = m.c1 * scaling.z; c1 = m.c1 * scaling.z;
c2 = m.c2 * scaling.z; c2 = m.c2 * scaling.z;
c3 = m.c3 * scaling.z; c3 = m.c3 * scaling.z;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,22 +25,22 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
/** @file mesh.h /** @file mesh.h
* @brief Declares the data structures in which the imported geometry is * @brief Declares the data structures in which the imported geometry is
returned by ASSIMP: aiMesh, aiFace and aiBone data structures. returned by ASSIMP: aiMesh, aiFace and aiBone data structures.
*/ */
#ifndef INCLUDED_AI_MESH_H #ifndef INCLUDED_AI_MESH_H
@ -53,15 +53,15 @@ extern "C" {
#endif #endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Limits. These values are required to match the settings Assimp was // Limits. These values are required to match the settings Assimp was
// compiled against. Therfore, do not redefine them unless you build the // compiled against. Therfore, do not redefine them unless you build the
// library from source using the same definitions. // library from source using the same definitions.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @def AI_MAX_FACE_INDICES /** @def AI_MAX_FACE_INDICES
* Maximum number of indices per face (polygon). */ * Maximum number of indices per face (polygon). */
#ifndef AI_MAX_FACE_INDICES #ifndef AI_MAX_FACE_INDICES
# define AI_MAX_FACE_INDICES 0x7fff # define AI_MAX_FACE_INDICES 0x7fff
#endif #endif
@ -101,35 +101,35 @@ extern "C" {
#endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS #endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief A single face in a mesh, referring to multiple vertices. /** @brief A single face in a mesh, referring to multiple vertices.
* *
* If mNumIndices is 3, we call the face 'triangle', for mNumIndices > 3 * If mNumIndices is 3, we call the face 'triangle', for mNumIndices > 3
* it's called 'polygon' (hey, that's just a definition!). * it's called 'polygon' (hey, that's just a definition!).
* <br> * <br>
* aiMesh::mPrimitiveTypes can be queried to quickly examine which types of * aiMesh::mPrimitiveTypes can be queried to quickly examine which types of
* primitive are actually present in a mesh. The #aiProcess_SortByPType flag * primitive are actually present in a mesh. The #aiProcess_SortByPType flag
* executes a special post-processing algorithm which splits meshes with * executes a special post-processing algorithm which splits meshes with
* *different* primitive types mixed up (e.g. lines and triangles) in several * *different* primitive types mixed up (e.g. lines and triangles) in several
* 'clean' submeshes. Furthermore there is a configuration option ( * 'clean' submeshes. Furthermore there is a configuration option (
* #AI_CONFIG_PP_SBP_REMOVE) to force #aiProcess_SortByPType to remove * #AI_CONFIG_PP_SBP_REMOVE) to force #aiProcess_SortByPType to remove
* specific kinds of primitives from the imported scene, completely and forever. * specific kinds of primitives from the imported scene, completely and forever.
* In many cases you'll probably want to set this setting to * In many cases you'll probably want to set this setting to
* @code * @code
* aiPrimitiveType_LINE|aiPrimitiveType_POINT * aiPrimitiveType_LINE|aiPrimitiveType_POINT
* @endcode * @endcode
* Together with the #aiProcess_Triangulate flag you can then be sure that * Together with the #aiProcess_Triangulate flag you can then be sure that
* #aiFace::mNumIndices is always 3. * #aiFace::mNumIndices is always 3.
* @note Take a look at the @link data Data Structures page @endlink for * @note Take a look at the @link data Data Structures page @endlink for
* more information on the layout and winding order of a face. * more information on the layout and winding order of a face.
*/ */
struct aiFace struct aiFace
{ {
//! Number of indices defining this face. //! Number of indices defining this face.
//! The maximum value for this member is #AI_MAX_FACE_INDICES. //! The maximum value for this member is #AI_MAX_FACE_INDICES.
unsigned int mNumIndices; unsigned int mNumIndices;
//! Pointer to the indices array. Size of the array is given in numIndices. //! Pointer to the indices array. Size of the array is given in numIndices.
unsigned int* mIndices; unsigned int* mIndices;
#ifdef __cplusplus #ifdef __cplusplus
@ -171,7 +171,7 @@ struct aiFace
return *this; return *this;
} }
//! Comparison operator. Checks whether the index array //! Comparison operator. Checks whether the index array
//! of two faces is identical //! of two faces is identical
bool operator== (const aiFace& o) const bool operator== (const aiFace& o) const
{ {
@ -185,7 +185,7 @@ struct aiFace
return false; return false;
} }
//! Inverse comparison operator. Checks whether the index //! Inverse comparison operator. Checks whether the index
//! array of two faces is NOT identical //! array of two faces is NOT identical
bool operator != (const aiFace& o) const bool operator != (const aiFace& o) const
{ {
@ -205,7 +205,7 @@ struct aiVertexWeight
//! The strength of the influence in the range (0...1). //! The strength of the influence in the range (0...1).
//! The influence from all bones at one vertex amounts to 1. //! The influence from all bones at one vertex amounts to 1.
float mWeight; float mWeight;
#ifdef __cplusplus #ifdef __cplusplus
@ -215,8 +215,8 @@ struct aiVertexWeight
//! Initialisation from a given index and vertex weight factor //! Initialisation from a given index and vertex weight factor
//! \param pID ID //! \param pID ID
//! \param pWeight Vertex weight factor //! \param pWeight Vertex weight factor
aiVertexWeight( unsigned int pID, float pWeight) aiVertexWeight( unsigned int pID, float pWeight)
: mVertexId( pID), mWeight( pWeight) : mVertexId( pID), mWeight( pWeight)
{ /* nothing to do here */ } { /* nothing to do here */ }
#endif // __cplusplus #endif // __cplusplus
@ -227,12 +227,12 @@ struct aiVertexWeight
/** @brief A single bone of a mesh. /** @brief A single bone of a mesh.
* *
* A bone has a name by which it can be found in the frame hierarchy and by * 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 * which it can be addressed by animations. In addition it has a number of
* influences on vertices. * influences on vertices.
*/ */
struct aiBone struct aiBone
{ {
//! The name of the bone. //! The name of the bone.
C_STRUCT aiString mName; C_STRUCT aiString mName;
//! The number of vertices affected by this bone //! The number of vertices affected by this bone
@ -278,7 +278,7 @@ struct aiBone
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief 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 aiFace Face data structure
* @see aiProcess_SortByPType Per-primitive sorting of meshes * @see aiProcess_SortByPType Per-primitive sorting of meshes
* @see aiProcess_Triangulate Automatic triangulation * @see aiProcess_Triangulate Automatic triangulation
@ -286,21 +286,21 @@ struct aiBone
*/ */
enum aiPrimitiveType enum aiPrimitiveType
{ {
/** A point primitive. /** A point primitive.
* *
* This is just a single vertex in the virtual world, * This is just a single vertex in the virtual world,
* #aiFace contains just one index for such a primitive. * #aiFace contains just one index for such a primitive.
*/ */
aiPrimitiveType_POINT = 0x1, aiPrimitiveType_POINT = 0x1,
/** A line primitive. /** A line primitive.
* *
* This is a line defined through a start and an end position. * This is a line defined through a start and an end position.
* #aiFace contains exactly two indices for such a primitive. * #aiFace contains exactly two indices for such a primitive.
*/ */
aiPrimitiveType_LINE = 0x2, aiPrimitiveType_LINE = 0x2,
/** A triangular primitive. /** A triangular primitive.
* *
* A triangle consists of three indices. * A triangle consists of three indices.
*/ */
@ -331,19 +331,19 @@ enum aiPrimitiveType
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief NOT CURRENTLY IN USE. An AnimMesh is an attachment to an #aiMesh stores per-vertex /** @brief NOT CURRENTLY IN USE. An AnimMesh is an attachment to an #aiMesh stores per-vertex
* animations for a particular frame. * animations for a particular frame.
* *
* You may think of an #aiAnimMesh as a `patch` for the host mesh, which * You may think of an #aiAnimMesh as a `patch` for the host mesh, which
* replaces only certain vertex data streams at a particular time. * replaces only certain vertex data streams at a particular time.
* Each mesh stores n attached attached meshes (#aiMesh::mAnimMeshes). * Each mesh stores n attached attached meshes (#aiMesh::mAnimMeshes).
* The actual relationship between the time line and anim meshes is * The actual relationship between the time line and anim meshes is
* established by #aiMeshAnim, which references singular mesh attachments * established by #aiMeshAnim, which references singular mesh attachments
* by their ID and binds them to a time offset. * by their ID and binds them to a time offset.
*/ */
struct aiAnimMesh struct aiAnimMesh
{ {
/** Replacement for aiMesh::mVertices. If this array is non-NULL, /** Replacement for aiMesh::mVertices. If this array is non-NULL,
* it *must* contain mNumVertices entries. The corresponding * it *must* contain mNumVertices entries. The corresponding
* array in the host mesh must be non-NULL as well - animation * array in the host mesh must be non-NULL as well - animation
* meshes may neither add or nor remove vertex components (if * meshes may neither add or nor remove vertex components (if
@ -393,10 +393,10 @@ struct aiAnimMesh
mColors[a] = NULL; mColors[a] = NULL;
} }
} }
~aiAnimMesh() ~aiAnimMesh()
{ {
delete [] mVertices; delete [] mVertices;
delete [] mNormals; delete [] mNormals;
delete [] mTangents; delete [] mTangents;
delete [] mBitangents; delete [] mBitangents;
@ -408,37 +408,37 @@ struct aiAnimMesh
} }
} }
/** Check whether the anim mesh overrides the vertex positions /** Check whether the anim mesh overrides the vertex positions
* of its host mesh*/ * of its host mesh*/
bool HasPositions() const { bool HasPositions() const {
return mVertices != NULL; return mVertices != NULL;
} }
/** Check whether the anim mesh overrides the vertex normals /** Check whether the anim mesh overrides the vertex normals
* of its host mesh*/ * of its host mesh*/
bool HasNormals() const { bool HasNormals() const {
return mNormals != NULL; return mNormals != NULL;
} }
/** Check whether the anim mesh overrides the vertex tangents /** Check whether the anim mesh overrides the vertex tangents
* and bitangents of its host mesh. As for aiMesh, * and bitangents of its host mesh. As for aiMesh,
* tangents and bitangents always go together. */ * tangents and bitangents always go together. */
bool HasTangentsAndBitangents() const { bool HasTangentsAndBitangents() const {
return mTangents != NULL; return mTangents != NULL;
} }
/** Check whether the anim mesh overrides a particular /** Check whether the anim mesh overrides a particular
* set of vertex colors on his host mesh. * set of vertex colors on his host mesh.
* @param pIndex 0<index<AI_MAX_NUMBER_OF_COLOR_SETS */ * @param pIndex 0<index<AI_MAX_NUMBER_OF_COLOR_SETS */
bool HasVertexColors( unsigned int pIndex) const { bool HasVertexColors( unsigned int pIndex) const {
return pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS ? false : mColors[pIndex] != NULL; return pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS ? false : mColors[pIndex] != NULL;
} }
/** Check whether the anim mesh overrides a particular /** Check whether the anim mesh overrides a particular
* set of texture coordinates on his host mesh. * set of texture coordinates on his host mesh.
* @param pIndex 0<index<AI_MAX_NUMBER_OF_TEXTURECOORDS */ * @param pIndex 0<index<AI_MAX_NUMBER_OF_TEXTURECOORDS */
bool HasTextureCoords( unsigned int pIndex) const { bool HasTextureCoords( unsigned int pIndex) const {
return pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS ? false : mTextureCoords[pIndex] != NULL; return pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS ? false : mTextureCoords[pIndex] != NULL;
} }
#endif #endif
@ -446,20 +446,20 @@ struct aiAnimMesh
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief 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 * 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 * referencing the vertices. In addition there might be a series of bones, each
* of them addressing a number of vertices with a certain weight. Vertex data * of them addressing a number of vertices with a certain weight. Vertex data
* is presented in channels with each channel containing a single per-vertex * is presented in channels with each channel containing a single per-vertex
* information such as a set of texture coords or a normal vector. * information such as a set of texture coords or a normal vector.
* If a data pointer is non-null, the corresponding data stream is present. * If a data pointer is non-null, the corresponding data stream is present.
* From C++-programs you can also use the comfort functions Has*() to * From C++-programs you can also use the comfort functions Has*() to
* test for the presence of various data streams. * test for the presence of various data streams.
* *
* A Mesh uses only a single material which is referenced by a material ID. * A Mesh uses only a single material which is referenced by a material ID.
* @note The mPositions member is usually not optional. However, vertex positions * @note The mPositions member is usually not optional. However, vertex positions
* *could* be missing if the #AI_SCENE_FLAGS_INCOMPLETE flag is set in * *could* be missing if the #AI_SCENE_FLAGS_INCOMPLETE flag is set in
* @code * @code
* aiScene::mFlags * aiScene::mFlags
* @endcode * @endcode
@ -468,31 +468,31 @@ struct aiMesh
{ {
/** Bitwise combination of the members of the #aiPrimitiveType enum. /** Bitwise combination of the members of the #aiPrimitiveType enum.
* This specifies which types of primitives are present in the mesh. * This specifies which types of primitives are present in the mesh.
* The "SortByPrimitiveType"-Step can be used to make sure the * The "SortByPrimitiveType"-Step can be used to make sure the
* output meshes consist of one primitive type each. * output meshes consist of one primitive type each.
*/ */
unsigned int mPrimitiveTypes; unsigned int mPrimitiveTypes;
/** The number of vertices in this mesh. /** The number of vertices in this mesh.
* This is also the size of all of the per-vertex data arrays. * This is also the size of all of the per-vertex data arrays.
* The maximum value for this member is #AI_MAX_VERTICES. * The maximum value for this member is #AI_MAX_VERTICES.
*/ */
unsigned int mNumVertices; unsigned int mNumVertices;
/** The number of primitives (triangles, polygons, lines) in this mesh. /** The number of primitives (triangles, polygons, lines) in this mesh.
* This is also the size of the mFaces array. * This is also the size of the mFaces array.
* The maximum value for this member is #AI_MAX_FACES. * The maximum value for this member is #AI_MAX_FACES.
*/ */
unsigned int mNumFaces; unsigned int mNumFaces;
/** Vertex positions. /** Vertex positions.
* This array is always present in a mesh. The array is * This array is always present in a mesh. The array is
* mNumVertices in size. * mNumVertices in size.
*/ */
C_STRUCT aiVector3D* mVertices; C_STRUCT aiVector3D* mVertices;
/** Vertex normals. /** Vertex normals.
* The array contains normalized vectors, NULL if not present. * The array contains normalized vectors, NULL if not present.
* The array is mNumVertices in size. Normals are undefined for * The array is mNumVertices in size. Normals are undefined for
* point and line primitives. A mesh consisting of points and * point and line primitives. A mesh consisting of points and
* lines only may not have normal vectors. Meshes with mixed * lines only may not have normal vectors. Meshes with mixed
@ -513,31 +513,31 @@ struct aiMesh
*/ */
C_STRUCT aiVector3D* mNormals; C_STRUCT aiVector3D* mNormals;
/** Vertex tangents. /** Vertex tangents.
* The tangent of a vertex points in the direction of the positive * The tangent of a vertex points in the direction of the positive
* X texture axis. The array contains normalized vectors, NULL if * X texture axis. The array contains normalized vectors, NULL if
* not present. The array is mNumVertices in size. A mesh consisting * not present. The array is mNumVertices in size. A mesh consisting
* of points and lines only may not have normal vectors. Meshes with * of points and lines only may not have normal vectors. Meshes with
* mixed primitive types (i.e. lines and triangles) may have * mixed primitive types (i.e. lines and triangles) may have
* normals, but the normals for vertices that are only referenced by * normals, but the normals for vertices that are only referenced by
* point or line primitives are undefined and set to qNaN. See * point or line primitives are undefined and set to qNaN. See
* the #mNormals member for a detailled discussion of qNaNs. * the #mNormals member for a detailled discussion of qNaNs.
* @note If the mesh contains tangents, it automatically also * @note If the mesh contains tangents, it automatically also
* contains bitangents. * contains bitangents.
*/ */
C_STRUCT aiVector3D* mTangents; C_STRUCT aiVector3D* mTangents;
/** Vertex bitangents. /** Vertex bitangents.
* The bitangent of a vertex points in the direction of the positive * The bitangent of a vertex points in the direction of the positive
* Y texture axis. The array contains normalized vectors, NULL if not * Y texture axis. The array contains normalized vectors, NULL if not
* present. The array is mNumVertices in size. * present. The array is mNumVertices in size.
* @note If the mesh contains tangents, it automatically also contains * @note If the mesh contains tangents, it automatically also contains
* bitangents. * bitangents.
*/ */
C_STRUCT aiVector3D* mBitangents; C_STRUCT aiVector3D* mBitangents;
/** Vertex color sets. /** Vertex color sets.
* A mesh may contain 0 to #AI_MAX_NUMBER_OF_COLOR_SETS vertex * A mesh may contain 0 to #AI_MAX_NUMBER_OF_COLOR_SETS vertex
* colors per vertex. NULL if not present. Each array is * colors per vertex. NULL if not present. Each array is
* mNumVertices in size if present. * mNumVertices in size if present.
*/ */
@ -545,7 +545,7 @@ struct aiMesh
/** Vertex texture coords, also known as UV channels. /** Vertex texture coords, also known as UV channels.
* A mesh may contain 0 to AI_MAX_NUMBER_OF_TEXTURECOORDS per * A mesh may contain 0 to AI_MAX_NUMBER_OF_TEXTURECOORDS per
* vertex. NULL if not present. The array is mNumVertices in size. * vertex. NULL if not present. The array is mNumVertices in size.
*/ */
C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS]; C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
@ -554,39 +554,39 @@ struct aiMesh
* or cube maps). If the value is 2 for a given channel n, the * or cube maps). If the value is 2 for a given channel n, the
* component p.z of mTextureCoords[n][p] is set to 0.0f. * component p.z of mTextureCoords[n][p] is set to 0.0f.
* If the value is 1 for a given channel, p.y is set to 0.0f, too. * If the value is 1 for a given channel, p.y is set to 0.0f, too.
* @note 4D coords are not supported * @note 4D coords are not supported
*/ */
unsigned int mNumUVComponents[AI_MAX_NUMBER_OF_TEXTURECOORDS]; unsigned int mNumUVComponents[AI_MAX_NUMBER_OF_TEXTURECOORDS];
/** The faces the mesh is constructed from. /** The faces the mesh is constructed from.
* Each face refers to a number of vertices by their indices. * Each face refers to a number of vertices by their indices.
* This array is always present in a mesh, its size is given * This array is always present in a mesh, its size is given
* in mNumFaces. If the #AI_SCENE_FLAGS_NON_VERBOSE_FORMAT * in mNumFaces. If the #AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
* is NOT set each face references an unique set of vertices. * is NOT set each face references an unique set of vertices.
*/ */
C_STRUCT aiFace* mFaces; C_STRUCT aiFace* mFaces;
/** The number of bones this mesh contains. /** The number of bones this mesh contains.
* Can be 0, in which case the mBones array is NULL. * Can be 0, in which case the mBones array is NULL.
*/ */
unsigned int mNumBones; unsigned int mNumBones;
/** The bones of this mesh. /** The bones of this mesh.
* A bone consists of a name by which it can be found in the * A bone consists of a name by which it can be found in the
* frame hierarchy and a set of vertex weights. * frame hierarchy and a set of vertex weights.
*/ */
C_STRUCT aiBone** mBones; C_STRUCT aiBone** mBones;
/** The material used by this mesh. /** The material used by this mesh.
* A mesh does use only a single material. If an imported model uses * A mesh does use only a single material. If an imported model uses
* multiple materials, the import splits up the mesh. Use this value * multiple materials, the import splits up the mesh. Use this value
* as index into the scene's material list. * as index into the scene's material list.
*/ */
unsigned int mMaterialIndex; unsigned int mMaterialIndex;
/** Name of the mesh. Meshes can be named, but this is not a /** Name of the mesh. Meshes can be named, but this is not a
* requirement and leaving this field empty is totally fine. * requirement and leaving this field empty is totally fine.
* There are mainly three uses for mesh names: * There are mainly three uses for mesh names:
* - some formats name nodes and meshes independently. * - some formats name nodes and meshes independently.
* - importers tend to split meshes up to meet the * - importers tend to split meshes up to meet the
* one-material-per-mesh requirement. Assigning * one-material-per-mesh requirement. Assigning
@ -601,7 +601,7 @@ struct aiMesh
/** NOT CURRENTLY IN USE. The number of attachment meshes */ /** NOT CURRENTLY IN USE. The number of attachment meshes */
unsigned int mNumAnimMeshes; unsigned int mNumAnimMeshes;
/** NOT CURRENTLY IN USE. Attachment meshes for this mesh, for vertex-based animation. /** NOT CURRENTLY IN USE. Attachment meshes for this mesh, for vertex-based animation.
* Attachment meshes carry replacement data for some of the * Attachment meshes carry replacement data for some of the
* mesh'es vertex components (usually positions, normals). */ * mesh'es vertex components (usually positions, normals). */
C_STRUCT aiAnimMesh** mAnimMeshes; C_STRUCT aiAnimMesh** mAnimMeshes;
@ -630,7 +630,7 @@ struct aiMesh
mNumUVComponents[a] = 0; mNumUVComponents[a] = 0;
mTextureCoords[a] = NULL; mTextureCoords[a] = NULL;
} }
for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++) for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; a++)
mColors[a] = NULL; mColors[a] = NULL;
} }
@ -638,7 +638,7 @@ struct aiMesh
//! Deletes all storage allocated for the mesh //! Deletes all storage allocated for the mesh
~aiMesh() ~aiMesh()
{ {
delete [] mVertices; delete [] mVertices;
delete [] mNormals; delete [] mNormals;
delete [] mTangents; delete [] mTangents;
delete [] mBitangents; delete [] mBitangents;
@ -668,48 +668,48 @@ struct aiMesh
} }
//! Check whether the mesh contains positions. Provided no special //! Check whether the mesh contains positions. Provided no special
//! scene flags are set, this will always be true //! scene flags are set, this will always be true
bool HasPositions() const bool HasPositions() const
{ return mVertices != NULL && mNumVertices > 0; } { return mVertices != NULL && mNumVertices > 0; }
//! Check whether the mesh contains faces. If no special scene flags //! Check whether the mesh contains faces. If no special scene flags
//! are set this should always return true //! are set this should always return true
bool HasFaces() const bool HasFaces() const
{ return mFaces != NULL && mNumFaces > 0; } { return mFaces != NULL && mNumFaces > 0; }
//! Check whether the mesh contains normal vectors //! Check whether the mesh contains normal vectors
bool HasNormals() const bool HasNormals() const
{ return mNormals != NULL && mNumVertices > 0; } { return mNormals != NULL && mNumVertices > 0; }
//! Check whether the mesh contains tangent and bitangent vectors //! Check whether the mesh contains tangent and bitangent vectors
//! It is not possible that it contains tangents and no bitangents //! It is not possible that it contains tangents and no bitangents
//! (or the other way round). The existence of one of them //! (or the other way round). The existence of one of them
//! implies that the second is there, too. //! implies that the second is there, too.
bool HasTangentsAndBitangents() const bool HasTangentsAndBitangents() const
{ return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; } { return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; }
//! Check whether the mesh contains a vertex color set //! Check whether the mesh contains a vertex color set
//! \param pIndex Index of the vertex color set //! \param pIndex Index of the vertex color set
bool HasVertexColors( unsigned int pIndex) const bool HasVertexColors( unsigned int pIndex) const
{ {
if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS) if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS)
return false; return false;
else else
return mColors[pIndex] != NULL && mNumVertices > 0; return mColors[pIndex] != NULL && mNumVertices > 0;
} }
//! Check whether the mesh contains a texture coordinate set //! Check whether the mesh contains a texture coordinate set
//! \param pIndex Index of the texture coordinates set //! \param pIndex Index of the texture coordinates set
bool HasTextureCoords( unsigned int pIndex) const bool HasTextureCoords( unsigned int pIndex) const
{ {
if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS) if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS)
return false; return false;
else else
return mTextureCoords[pIndex] != NULL && mNumVertices > 0; return mTextureCoords[pIndex] != NULL && mNumVertices > 0;
} }
//! Get the number of UV channels the mesh contains //! Get the number of UV channels the mesh contains
unsigned int GetNumUVChannels() const unsigned int GetNumUVChannels() const
{ {
unsigned int n = 0; unsigned int n = 0;
while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n; while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n;
@ -717,7 +717,7 @@ struct aiMesh
} }
//! Get the number of vertex color channels the mesh contains //! Get the number of vertex color channels the mesh contains
unsigned int GetNumColorChannels() const unsigned int GetNumColorChannels() const
{ {
unsigned int n = 0; unsigned int n = 0;
while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n; while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -63,10 +63,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
typedef enum aiMetadataType typedef enum aiMetadataType
{ {
AI_BOOL = 0, AI_BOOL = 0,
AI_INT = 1, AI_INT = 1,
AI_UINT64 = 2, AI_UINT64 = 2,
AI_FLOAT = 3, AI_FLOAT = 3,
AI_AISTRING = 4, AI_AISTRING = 4,
AI_AIVECTOR3D = 5, AI_AIVECTOR3D = 5,
@ -123,7 +123,7 @@ inline aiMetadataType GetAiType( aiVector3D ) { return AI_AIVECTOR3D; }
* Metadata is a key-value store using string keys and values. * Metadata is a key-value store using string keys and values.
*/ */
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
struct aiMetadata struct aiMetadata
{ {
/** Length of the mKeys and mValues arrays, respectively */ /** Length of the mKeys and mValues arrays, respectively */
unsigned int mNumProperties; unsigned int mNumProperties;
@ -157,7 +157,7 @@ struct aiMetadata
for (unsigned i=0; i<mNumProperties; ++i) for (unsigned i=0; i<mNumProperties; ++i)
{ {
void* data = mValues[i].mData; void* data = mValues[i].mData;
switch (mValues[i].mType) switch (mValues[i].mType)
{ {
case AI_BOOL: case AI_BOOL:
delete static_cast<bool*>(data); delete static_cast<bool*>(data);
@ -212,13 +212,13 @@ struct aiMetadata
// In range assertion // In range assertion
assert(index < mNumProperties); assert(index < mNumProperties);
// Return false if the output data type does // Return false if the output data type does
// not match the found value's data type // not match the found value's data type
if ( GetAiType( value ) != mValues[ index ].mType ) { if ( GetAiType( value ) != mValues[ index ].mType ) {
return false; return false;
} }
// Otherwise, output the found value and // Otherwise, output the found value and
// return true // return true
value = *static_cast<T*>(mValues[index].mData); value = *static_cast<T*>(mValues[index].mData);
return true; return true;
@ -236,7 +236,7 @@ struct aiMetadata
template<typename T> template<typename T>
inline bool Get( const std::string& key, T& value ) { inline bool Get( const std::string& key, T& value ) {
return Get(aiString(key), value); return Get(aiString(key), value);
} }
#endif // __cplusplus #endif // __cplusplus

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,16 +23,16 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -66,10 +66,10 @@ enum aiPostProcessSteps
{ {
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Calculates the tangents and bitangents for the imported meshes. /** <hr>Calculates the tangents and bitangents for the imported meshes.
* *
* Does nothing if a mesh does not have normals. You might want this post * Does nothing if a mesh does not have normals. You might want this post
* processing step to be executed if you plan to use tangent space calculations * processing step to be executed if you plan to use tangent space calculations
* such as normal mapping applied to the meshes. There's an importer property, * such as normal mapping applied to the meshes. There's an importer property,
* <tt>#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE</tt>, which allows you to specify * <tt>#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE</tt>, which allows you to specify
* a maximum smoothing angle for the algorithm. However, usually you'll * a maximum smoothing angle for the algorithm. However, usually you'll
@ -78,9 +78,9 @@ enum aiPostProcessSteps
aiProcess_CalcTangentSpace = 0x1, aiProcess_CalcTangentSpace = 0x1,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Identifies and joins identical vertex data sets within all /** <hr>Identifies and joins identical vertex data sets within all
* imported meshes. * imported meshes.
* *
* After this step is run, each mesh contains unique vertices, * After this step is run, each mesh contains unique vertices,
* so a vertex may be used by multiple faces. You usually want * so a vertex may be used by multiple faces. You usually want
* to use this post processing step. If your application deals with * to use this post processing step. If your application deals with
@ -91,12 +91,12 @@ enum aiPostProcessSteps
aiProcess_JoinIdenticalVertices = 0x2, aiProcess_JoinIdenticalVertices = 0x2,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Converts all the imported data to a left-handed coordinate space. /** <hr>Converts all the imported data to a left-handed coordinate space.
* *
* By default the data is returned in a right-handed coordinate space (which * By default the data is returned in a right-handed coordinate space (which
* OpenGL prefers). In this space, +X points to the right, * OpenGL prefers). In this space, +X points to the right,
* +Z points towards the viewer, and +Y points upwards. In the DirectX * +Z points towards the viewer, and +Y points upwards. In the DirectX
* coordinate space +X points to the right, +Y points upwards, and +Z points * coordinate space +X points to the right, +Y points upwards, and +Z points
* away from the viewer. * away from the viewer.
* *
* You'll probably want to consider this flag if you use Direct3D for * You'll probably want to consider this flag if you use Direct3D for
@ -107,11 +107,11 @@ enum aiPostProcessSteps
aiProcess_MakeLeftHanded = 0x4, aiProcess_MakeLeftHanded = 0x4,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Triangulates all faces of all meshes. /** <hr>Triangulates all faces of all meshes.
* *
* By default the imported mesh data might contain faces with more than 3 * By default the imported mesh data might contain faces with more than 3
* indices. For rendering you'll usually want all faces to be triangles. * indices. For rendering you'll usually want all faces to be triangles.
* This post processing step splits up faces with more than 3 indices into * This post processing step splits up faces with more than 3 indices into
* triangles. Line and point primitives are *not* modified! If you want * triangles. Line and point primitives are *not* modified! If you want
* 'triangles only' with no other kinds of primitives, try the following * 'triangles only' with no other kinds of primitives, try the following
* solution: * solution:
@ -123,18 +123,18 @@ enum aiPostProcessSteps
aiProcess_Triangulate = 0x8, aiProcess_Triangulate = 0x8,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Removes some parts of the data structure (animations, materials, /** <hr>Removes some parts of the data structure (animations, materials,
* light sources, cameras, textures, vertex components). * light sources, cameras, textures, vertex components).
* *
* The components to be removed are specified in a separate * The components to be removed are specified in a separate
* importer property, <tt>#AI_CONFIG_PP_RVC_FLAGS</tt>. This is quite useful * importer property, <tt>#AI_CONFIG_PP_RVC_FLAGS</tt>. This is quite useful
* if you don't need all parts of the output structure. Vertex colors * if you don't need all parts of the output structure. Vertex colors
* are rarely used today for example... Calling this step to remove unneeded * are rarely used today for example... Calling this step to remove unneeded
* data from the pipeline as early as possible results in increased * data from the pipeline as early as possible results in increased
* performance and a more optimized output data structure. * performance and a more optimized output data structure.
* This step is also useful if you want to force Assimp to recompute * This step is also useful if you want to force Assimp to recompute
* normals or tangents. The corresponding steps don't recompute them if * normals or tangents. The corresponding steps don't recompute them if
* they're already there (loaded from the source asset). By using this * they're already there (loaded from the source asset). By using this
* step you can make sure they are NOT there. * step you can make sure they are NOT there.
* *
* This flag is a poor one, mainly because its purpose is usually * This flag is a poor one, mainly because its purpose is usually
@ -144,14 +144,14 @@ enum aiPostProcessSteps
* optimize the data because of these nasty little vertex colors. * optimize the data because of these nasty little vertex colors.
* Most apps don't even process them, so it's all for nothing. By using * Most apps don't even process them, so it's all for nothing. By using
* this step, unneeded components are excluded as early as possible * this step, unneeded components are excluded as early as possible
* thus opening more room for internal optimizations. * thus opening more room for internal optimizations.
*/ */
aiProcess_RemoveComponent = 0x10, aiProcess_RemoveComponent = 0x10,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Generates normals for all faces of all meshes. /** <hr>Generates normals for all faces of all meshes.
* *
* This is ignored if normals are already there at the time this flag * This is ignored if normals are already there at the time this flag
* is evaluated. Model importers try to load them from the source file, so * is evaluated. Model importers try to load them from the source file, so
* they're usually already there. Face normals are shared between all points * they're usually already there. Face normals are shared between all points
* of a single face, so a single point can have multiple normals, which * of a single face, so a single point can have multiple normals, which
@ -165,12 +165,12 @@ enum aiPostProcessSteps
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Generates smooth normals for all vertices in the mesh. /** <hr>Generates smooth normals for all vertices in the mesh.
* *
* This is ignored if normals are already there at the time this flag * This is ignored if normals are already there at the time this flag
* is evaluated. Model importers try to load them from the source file, so * is evaluated. Model importers try to load them from the source file, so
* they're usually already there. * they're usually already there.
* *
* This flag may not be specified together with * This flag may not be specified together with
* #aiProcess_GenNormals. There's a importer property, * #aiProcess_GenNormals. There's a importer property,
* <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</tt> which allows you to specify * <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</tt> which allows you to specify
* an angle maximum for the normal smoothing algorithm. Normals exceeding * an angle maximum for the normal smoothing algorithm. Normals exceeding
* this limit are not smoothed, resulting in a 'hard' seam between two faces. * this limit are not smoothed, resulting in a 'hard' seam between two faces.
@ -183,15 +183,15 @@ enum aiPostProcessSteps
/** <hr>Splits large meshes into smaller sub-meshes. /** <hr>Splits large meshes into smaller sub-meshes.
* *
* This is quite useful for real-time rendering, where the number of triangles * This is quite useful for real-time rendering, where the number of triangles
* which can be maximally processed in a single draw-call is limited * which can be maximally processed in a single draw-call is limited
* by the video driver/hardware. The maximum vertex buffer is usually limited * by the video driver/hardware. The maximum vertex buffer is usually limited
* too. Both requirements can be met with this step: you may specify both a * too. Both requirements can be met with this step: you may specify both a
* triangle and vertex limit for a single mesh. * triangle and vertex limit for a single mesh.
* *
* The split limits can (and should!) be set through the * The split limits can (and should!) be set through the
* <tt>#AI_CONFIG_PP_SLM_VERTEX_LIMIT</tt> and <tt>#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT</tt> * <tt>#AI_CONFIG_PP_SLM_VERTEX_LIMIT</tt> and <tt>#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT</tt>
* importer properties. The default values are <tt>#AI_SLM_DEFAULT_MAX_VERTICES</tt> and * importer properties. The default values are <tt>#AI_SLM_DEFAULT_MAX_VERTICES</tt> and
* <tt>#AI_SLM_DEFAULT_MAX_TRIANGLES</tt>. * <tt>#AI_SLM_DEFAULT_MAX_TRIANGLES</tt>.
* *
* Note that splitting is generally a time-consuming task, but only if there's * Note that splitting is generally a time-consuming task, but only if there's
* something to split. The use of this step is recommended for most users. * something to split. The use of this step is recommended for most users.
@ -210,12 +210,12 @@ enum aiPostProcessSteps
* Animations are removed during this step. * Animations are removed during this step.
* This step is intended for applications without a scenegraph. * This step is intended for applications without a scenegraph.
* The step CAN cause some problems: if e.g. a mesh of the asset * The step CAN cause some problems: if e.g. a mesh of the asset
* contains normals and another, using the same material index, does not, * contains normals and another, using the same material index, does not,
* they will be brought together, but the first meshes's part of * they will be brought together, but the first meshes's part of
* the normal list is zeroed. However, these artifacts are rare. * the normal list is zeroed. However, these artifacts are rare.
* @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE</tt> configuration property * @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE</tt> configuration property
* can be set to normalize the scene's spatial dimension to the -1...1 * can be set to normalize the scene's spatial dimension to the -1...1
* range. * range.
*/ */
aiProcess_PreTransformVertices = 0x100, aiProcess_PreTransformVertices = 0x100,
@ -223,14 +223,14 @@ enum aiPostProcessSteps
/** <hr>Limits the number of bones simultaneously affecting a single vertex /** <hr>Limits the number of bones simultaneously affecting a single vertex
* to a maximum value. * to a maximum value.
* *
* If any vertex is affected by more than the maximum number of bones, the least * If any vertex is affected by more than the maximum number of bones, the least
* important vertex weights are removed and the remaining vertex weights are * important vertex weights are removed and the remaining vertex weights are
* renormalized so that the weights still sum up to 1. * renormalized so that the weights still sum up to 1.
* The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS</tt> in * The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS</tt> in
* config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</tt> importer * config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</tt> importer
* property to supply your own limit to the post processing step. * property to supply your own limit to the post processing step.
* *
* If you intend to perform the skinning in hardware, this post processing * If you intend to perform the skinning in hardware, this post processing
* step might be of interest to you. * step might be of interest to you.
*/ */
aiProcess_LimitBoneWeights = 0x200, aiProcess_LimitBoneWeights = 0x200,
@ -243,7 +243,7 @@ enum aiPostProcessSteps
* It is recommended that you capture Assimp's log output if you use this flag, * It is recommended that you capture Assimp's log output if you use this flag,
* so you can easily find out what's wrong if a file fails the * so you can easily find out what's wrong if a file fails the
* validation. The validator is quite strict and will find *all* * validation. The validator is quite strict and will find *all*
* inconsistencies in the data structure... It is recommended that plugin * inconsistencies in the data structure... It is recommended that plugin
* developers use it to debug their loaders. There are two types of * developers use it to debug their loaders. There are two types of
* validation failures: * validation failures:
* <ul> * <ul>
@ -251,7 +251,7 @@ enum aiPostProcessSteps
* postprocessing is not possible and the data is not usable at all. * postprocessing is not possible and the data is not usable at all.
* The import fails. #Importer::GetErrorString() or #aiGetErrorString() * The import fails. #Importer::GetErrorString() or #aiGetErrorString()
* carry the error message around.</li> * carry the error message around.</li>
* <li>Warning: There are some minor issues (e.g. 1000000 animation * <li>Warning: There are some minor issues (e.g. 1000000 animation
* keyframes with the same time), but further postprocessing and use * keyframes with the same time), but further postprocessing and use
* of the data structure is still safe. Warning details are written * of the data structure is still safe. Warning details are written
* to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING</tt> is set * to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING</tt> is set
@ -259,7 +259,7 @@ enum aiPostProcessSteps
* </ul> * </ul>
* *
* This post-processing step is not time-consuming. Its use is not * This post-processing step is not time-consuming. Its use is not
* compulsory, but recommended. * compulsory, but recommended.
*/ */
aiProcess_ValidateDataStructure = 0x400, aiProcess_ValidateDataStructure = 0x400,
@ -267,7 +267,7 @@ enum aiPostProcessSteps
/** <hr>Reorders triangles for better vertex cache locality. /** <hr>Reorders triangles for better vertex cache locality.
* *
* The step tries to improve the ACMR (average post-transform vertex cache * The step tries to improve the ACMR (average post-transform vertex cache
* miss ratio) for all meshes. The implementation runs in O(n) and is * miss ratio) for all meshes. The implementation runs in O(n) and is
* roughly based on the 'tipsify' algorithm (see <a href=" * roughly based on the 'tipsify' algorithm (see <a href="
* http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf">this * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf">this
* paper</a>). * paper</a>).
@ -281,9 +281,9 @@ enum aiPostProcessSteps
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>Searches for redundant/unreferenced materials and removes them. /** <hr>Searches for redundant/unreferenced materials and removes them.
* *
* This is especially useful in combination with the * This is especially useful in combination with the
* #aiProcess_PreTransformVertices and #aiProcess_OptimizeMeshes flags. * #aiProcess_PreTransformVertices and #aiProcess_OptimizeMeshes flags.
* Both join small meshes with equal characteristics, but they can't do * Both join small meshes with equal characteristics, but they can't do
* their work if two meshes have different materials. Because several * their work if two meshes have different materials. Because several
* material settings are lost during Assimp's import filters, * material settings are lost during Assimp's import filters,
* (and because many exporters don't check for redundant materials), huge * (and because many exporters don't check for redundant materials), huge
@ -293,14 +293,14 @@ enum aiPostProcessSteps
* Several material settings not contributing to the final appearance of * Several material settings not contributing to the final appearance of
* a surface are ignored in all comparisons (e.g. the material name). * a surface are ignored in all comparisons (e.g. the material name).
* So, if you're passing additional information through the * So, if you're passing additional information through the
* content pipeline (probably using *magic* material names), don't * content pipeline (probably using *magic* material names), don't
* specify this flag. Alternatively take a look at the * specify this flag. Alternatively take a look at the
* <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST</tt> importer property. * <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST</tt> importer property.
*/ */
aiProcess_RemoveRedundantMaterials = 0x1000, aiProcess_RemoveRedundantMaterials = 0x1000,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>This step tries to determine which meshes have normal vectors /** <hr>This step tries to determine which meshes have normal vectors
* that are facing inwards and inverts them. * that are facing inwards and inverts them.
* *
* The algorithm is simple but effective: * The algorithm is simple but effective:
@ -314,11 +314,11 @@ enum aiPostProcessSteps
aiProcess_FixInfacingNormals = 0x2000, aiProcess_FixInfacingNormals = 0x2000,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>This step splits meshes with more than one primitive type in /** <hr>This step splits meshes with more than one primitive type in
* homogeneous sub-meshes. * homogeneous sub-meshes.
* *
* The step is executed after the triangulation step. After the step * The step is executed after the triangulation step. After the step
* returns, just one bit is set in aiMesh::mPrimitiveTypes. This is * returns, just one bit is set in aiMesh::mPrimitiveTypes. This is
* especially useful for real-time rendering where point and line * especially useful for real-time rendering where point and line
* primitives are often ignored or rendered separately. * primitives are often ignored or rendered separately.
* You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to * You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
@ -352,14 +352,14 @@ enum aiPostProcessSteps
* <li>Specify the #aiProcess_SortByPType flag. This moves line and * <li>Specify the #aiProcess_SortByPType flag. This moves line and
* point primitives to separate meshes. * point primitives to separate meshes.
* </li> * </li>
* <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to * <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
* @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES * @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
* @endcode to cause SortByPType to reject point * @endcode to cause SortByPType to reject point
* and line meshes from the scene. * and line meshes from the scene.
* </li> * </li>
* </ul> * </ul>
* @note Degenerate polygons are not necessarily evil and that's why * @note Degenerate polygons are not necessarily evil and that's why
* they're not removed by default. There are several file formats which * they're not removed by default. There are several file formats which
* don't support lines or points, and some exporters bypass the * don't support lines or points, and some exporters bypass the
* format specification and write them as degenerate triangles instead. * format specification and write them as degenerate triangles instead.
*/ */
@ -386,9 +386,9 @@ enum aiPostProcessSteps
* *
* Most applications will support UV mapping only, so you will * Most applications will support UV mapping only, so you will
* probably want to specify this step in every case. Note that Assimp is not * probably want to specify this step in every case. Note that Assimp is not
* always able to match the original mapping implementation of the * always able to match the original mapping implementation of the
* 3D app which produced a model perfectly. It's always better to let the * 3D app which produced a model perfectly. It's always better to let the
* modelling app compute the UV channels - 3ds max, Maya, Blender, * modelling app compute the UV channels - 3ds max, Maya, Blender,
* LightWave, and Modo do this for example. * LightWave, and Modo do this for example.
* *
* @note If this step is not requested, you'll need to process the * @note If this step is not requested, you'll need to process the
@ -400,15 +400,15 @@ enum aiPostProcessSteps
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>This step applies per-texture UV transformations and bakes /** <hr>This step applies per-texture UV transformations and bakes
* them into stand-alone vtexture coordinate channels. * them into stand-alone vtexture coordinate channels.
* *
* UV transformations are specified per-texture - see the * UV transformations are specified per-texture - see the
* <tt>#AI_MATKEY_UVTRANSFORM</tt> material key for more information. * <tt>#AI_MATKEY_UVTRANSFORM</tt> material key for more information.
* This step processes all textures with * This step processes all textures with
* transformed input UV coordinates and generates a new (pre-transformed) UV channel * transformed input UV coordinates and generates a new (pre-transformed) UV channel
* which replaces the old channel. Most applications won't support UV * which replaces the old channel. Most applications won't support UV
* transformations, so you will probably want to specify this step. * transformations, so you will probably want to specify this step.
* *
* @note UV transformations are usually implemented in real-time apps by * @note UV transformations are usually implemented in real-time apps by
* transforming texture coordinates at vertex shader stage with a 3x3 * transforming texture coordinates at vertex shader stage with a 3x3
* (homogenous) transformation matrix. * (homogenous) transformation matrix.
*/ */
@ -421,10 +421,10 @@ enum aiPostProcessSteps
* This step takes a while, so don't use it if speed is a concern. * This step takes a while, so don't use it if speed is a concern.
* Its main purpose is to workaround the fact that many export * Its main purpose is to workaround the fact that many export
* file formats don't support instanced meshes, so exporters need to * file formats don't support instanced meshes, so exporters need to
* duplicate meshes. This step removes the duplicates again. Please * duplicate meshes. This step removes the duplicates again. Please
* note that Assimp does not currently support per-node material * note that Assimp does not currently support per-node material
* assignment to meshes, which means that identical meshes with * assignment to meshes, which means that identical meshes with
* different materials are currently *not* joined, although this is * different materials are currently *not* joined, although this is
* planned for future versions. * planned for future versions.
*/ */
aiProcess_FindInstances = 0x100000, aiProcess_FindInstances = 0x100000,
@ -438,13 +438,13 @@ enum aiPostProcessSteps
* together with #aiProcess_OptimizeGraph, if possible. The flag is fully * together with #aiProcess_OptimizeGraph, if possible. The flag is fully
* compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType. * compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.
*/ */
aiProcess_OptimizeMeshes = 0x200000, aiProcess_OptimizeMeshes = 0x200000,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>A postprocessing step to optimize the scene hierarchy. /** <hr>A postprocessing step to optimize the scene hierarchy.
* *
* Nodes without animations, bones, lights or cameras assigned are * Nodes without animations, bones, lights or cameras assigned are
* collapsed and joined. * collapsed and joined.
* *
* Node names can be lost during this step. If you use special 'tag nodes' * Node names can be lost during this step. If you use special 'tag nodes'
@ -453,21 +453,21 @@ enum aiPostProcessSteps
* list of node names you want to be kept. Nodes matching one of the names * list of node names you want to be kept. Nodes matching one of the names
* in this list won't be touched or modified. * in this list won't be touched or modified.
* *
* Use this flag with caution. Most simple files will be collapsed to a * Use this flag with caution. Most simple files will be collapsed to a
* single node, so complex hierarchies are usually completely lost. This is not * single node, so complex hierarchies are usually completely lost. This is not
* useful for editor environments, but probably a very effective * useful for editor environments, but probably a very effective
* optimization if you just want to get the model data, convert it to your * optimization if you just want to get the model data, convert it to your
* own format, and render it as fast as possible. * own format, and render it as fast as possible.
* *
* This flag is designed to be used with #aiProcess_OptimizeMeshes for best * This flag is designed to be used with #aiProcess_OptimizeMeshes for best
* results. * results.
* *
* @note 'Crappy' scenes with thousands of extremely small meshes packed * @note 'Crappy' scenes with thousands of extremely small meshes packed
* in deeply nested nodes exist for almost all file formats. * in deeply nested nodes exist for almost all file formats.
* #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph * #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph
* usually fixes them all and makes them renderable. * usually fixes them all and makes them renderable.
*/ */
aiProcess_OptimizeGraph = 0x400000, aiProcess_OptimizeGraph = 0x400000,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>This step flips all UV coordinates along the y-axis and adjusts /** <hr>This step flips all UV coordinates along the y-axis and adjusts
@ -475,7 +475,7 @@ enum aiPostProcessSteps
* *
* <b>Output UV coordinate system:</b> * <b>Output UV coordinate system:</b>
* @code * @code
* 0y|0y ---------- 1x|0y * 0y|0y ---------- 1x|0y
* | | * | |
* | | * | |
* | | * | |
@ -487,7 +487,7 @@ enum aiPostProcessSteps
* setting and bundles all conversions typically required for D3D-based * setting and bundles all conversions typically required for D3D-based
* applications. * applications.
*/ */
aiProcess_FlipUVs = 0x800000, aiProcess_FlipUVs = 0x800000,
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>This step adjusts the output face winding order to be CW. /** <hr>This step adjusts the output face winding order to be CW.
@ -497,7 +497,7 @@ enum aiPostProcessSteps
* <b>Output face order:</b> * <b>Output face order:</b>
* @code * @code
* x2 * x2
* *
* x0 * x0
* x1 * x1
* @endcode * @endcode
@ -506,7 +506,7 @@ enum aiPostProcessSteps
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
/** <hr>This step splits meshes with many bones into sub-meshes so that each /** <hr>This step splits meshes with many bones into sub-meshes so that each
* su-bmesh has fewer or as many bones as a given limit. * su-bmesh has fewer or as many bones as a given limit.
*/ */
aiProcess_SplitByBoneCount = 0x2000000, aiProcess_SplitByBoneCount = 0x2000000,
@ -517,10 +517,10 @@ enum aiPostProcessSteps
* assign dummy bone weights to otherwise static meshes assigned to * assign dummy bone weights to otherwise static meshes assigned to
* animated meshes. Full, weight-based skinning is expensive while * animated meshes. Full, weight-based skinning is expensive while
* animating nodes is extremely cheap, so this step is offered to clean up * animating nodes is extremely cheap, so this step is offered to clean up
* the data in that regard. * the data in that regard.
* *
* Use <tt>#AI_CONFIG_PP_DB_THRESHOLD</tt> to control this. * Use <tt>#AI_CONFIG_PP_DB_THRESHOLD</tt> to control this.
* Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and * Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and
* only if all bones within the scene qualify for removal. * only if all bones within the scene qualify for removal.
*/ */
aiProcess_Debone = 0x4000000 aiProcess_Debone = 0x4000000
@ -533,33 +533,33 @@ enum aiPostProcessSteps
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
/** @def aiProcess_ConvertToLeftHanded /** @def aiProcess_ConvertToLeftHanded
* @brief Shortcut flag for Direct3D-based applications. * @brief Shortcut flag for Direct3D-based applications.
* *
* Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and * Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and
* #aiProcess_FlipWindingOrder flags. * #aiProcess_FlipWindingOrder flags.
* The output data matches Direct3D's conventions: left-handed geometry, upper-left * The output data matches Direct3D's conventions: left-handed geometry, upper-left
* origin for UV coordinates and finally clockwise face order, suitable for CCW culling. * origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
* *
* @deprecated * @deprecated
*/ */
#define aiProcess_ConvertToLeftHanded ( \ #define aiProcess_ConvertToLeftHanded ( \
aiProcess_MakeLeftHanded | \ aiProcess_MakeLeftHanded | \
aiProcess_FlipUVs | \ aiProcess_FlipUVs | \
aiProcess_FlipWindingOrder | \ aiProcess_FlipWindingOrder | \
0 ) 0 )
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
/** @def aiProcessPreset_TargetRealtime_Fast /** @def aiProcessPreset_TargetRealtime_Fast
* @brief Default postprocess configuration optimizing the data for real-time rendering. * @brief Default postprocess configuration optimizing the data for real-time rendering.
* *
* Applications would want to use this preset to load models on end-user PCs, * Applications would want to use this preset to load models on end-user PCs,
* maybe for direct use in game. * maybe for direct use in game.
* *
* If you're using DirectX, don't forget to combine this value with * If you're using DirectX, don't forget to combine this value with
* the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
* in your application apply the #aiProcess_TransformUVCoords step, too. * in your application apply the #aiProcess_TransformUVCoords step, too.
* @note Please take the time to read the docs for the steps enabled by this preset. * @note Please take the time to read the docs for the steps enabled by this preset.
* Some of them offer further configurable properties, while some of them might not be of * Some of them offer further configurable properties, while some of them might not be of
* use for you so it might be better to not specify them. * use for you so it might be better to not specify them.
*/ */
@ -580,11 +580,11 @@ enum aiPostProcessSteps
* performs some extra optimizations to improve rendering speed and * performs some extra optimizations to improve rendering speed and
* to minimize memory usage. It could be a good choice for a level editor * to minimize memory usage. It could be a good choice for a level editor
* environment where import speed is not so important. * environment where import speed is not so important.
* *
* If you're using DirectX, don't forget to combine this value with * If you're using DirectX, don't forget to combine this value with
* the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
* in your application apply the #aiProcess_TransformUVCoords step, too. * in your application apply the #aiProcess_TransformUVCoords step, too.
* @note Please take the time to read the docs for the steps enabled by this preset. * @note Please take the time to read the docs for the steps enabled by this preset.
* Some of them offer further configurable properties, while some of them might not be * Some of them offer further configurable properties, while some of them might not be
* of use for you so it might be better to not specify them. * of use for you so it might be better to not specify them.
*/ */
@ -608,13 +608,13 @@ enum aiPostProcessSteps
* @brief Default postprocess configuration optimizing the data for real-time rendering. * @brief Default postprocess configuration optimizing the data for real-time rendering.
* *
* This preset enables almost every optimization step to achieve perfectly * This preset enables almost every optimization step to achieve perfectly
* optimized data. It's your choice for level editor environments where import speed * optimized data. It's your choice for level editor environments where import speed
* is not important. * is not important.
* *
* If you're using DirectX, don't forget to combine this value with * If you're using DirectX, don't forget to combine this value with
* the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
* in your application, apply the #aiProcess_TransformUVCoords step, too. * in your application, apply the #aiProcess_TransformUVCoords step, too.
* @note Please take the time to read the docs for the steps enabled by this preset. * @note Please take the time to read the docs for the steps enabled by this preset.
* Some of them offer further configurable properties, while some of them might not be * Some of them offer further configurable properties, while some of them might not be
* of use for you so it might be better to not specify them. * of use for you so it might be better to not specify them.
*/ */

View File

@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2015, assimp team Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the with or without modification, are permitted provided that the
following conditions are met: following conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -23,16 +23,16 @@ following conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -56,7 +56,7 @@ class aiQuaterniont
{ {
public: public:
aiQuaterniont() : w(1.0), x(), y(), z() {} aiQuaterniont() : w(1.0), x(), y(), z() {}
aiQuaterniont(TReal pw, TReal px, TReal py, TReal pz) aiQuaterniont(TReal pw, TReal px, TReal py, TReal pz)
: w(pw), x(px), y(py), z(pz) {} : w(pw), x(px), y(py), z(pz) {}
/** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */ /** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */
@ -103,13 +103,13 @@ public:
* @param pEnd End rotation, factor == 1. * @param pEnd End rotation, factor == 1.
* @param pFactor Interpolation factor between 0 and 1. Values outside of this range yield undefined results. * @param pFactor Interpolation factor between 0 and 1. Values outside of this range yield undefined results.
*/ */
static void Interpolate( aiQuaterniont& pOut, const aiQuaterniont& pStart, static void Interpolate( aiQuaterniont& pOut, const aiQuaterniont& pStart,
const aiQuaterniont& pEnd, TReal pFactor); const aiQuaterniont& pEnd, TReal pFactor);
public: public:
//! w,x,y,z components of the quaternion //! w,x,y,z components of the quaternion
TReal w, x, y, z; TReal w, x, y, z;
} ; } ;
typedef aiQuaterniont<float> aiQuaternion; typedef aiQuaterniont<float> aiQuaternion;
@ -117,7 +117,7 @@ typedef aiQuaterniont<float> aiQuaternion;
#else #else
struct aiQuaternion { struct aiQuaternion {
float w, x, y, z; float w, x, y, z;
}; };
#endif #endif

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -90,25 +90,25 @@ inline aiQuaterniont<TReal>::aiQuaterniont( const aiMatrix3x3t<TReal> &pRotMatri
z = (pRotMatrix.b1 - pRotMatrix.a2) / s; z = (pRotMatrix.b1 - pRotMatrix.a2) / s;
w = static_cast<TReal>(0.25) * s; w = static_cast<TReal>(0.25) * s;
} // else we have to check several cases } // else we have to check several cases
else if( pRotMatrix.a1 > pRotMatrix.b2 && pRotMatrix.a1 > pRotMatrix.c3 ) else if( pRotMatrix.a1 > pRotMatrix.b2 && pRotMatrix.a1 > pRotMatrix.c3 )
{ {
// Column 0: // Column 0:
TReal s = std::sqrt( static_cast<TReal>(1.0) + pRotMatrix.a1 - pRotMatrix.b2 - pRotMatrix.c3) * static_cast<TReal>(2.0); TReal s = std::sqrt( static_cast<TReal>(1.0) + pRotMatrix.a1 - pRotMatrix.b2 - pRotMatrix.c3) * static_cast<TReal>(2.0);
x = static_cast<TReal>(0.25) * s; x = static_cast<TReal>(0.25) * s;
y = (pRotMatrix.b1 + pRotMatrix.a2) / s; y = (pRotMatrix.b1 + pRotMatrix.a2) / s;
z = (pRotMatrix.a3 + pRotMatrix.c1) / s; z = (pRotMatrix.a3 + pRotMatrix.c1) / s;
w = (pRotMatrix.c2 - pRotMatrix.b3) / s; w = (pRotMatrix.c2 - pRotMatrix.b3) / s;
} }
else if( pRotMatrix.b2 > pRotMatrix.c3) else if( pRotMatrix.b2 > pRotMatrix.c3)
{ {
// Column 1: // Column 1:
TReal s = std::sqrt( static_cast<TReal>(1.0) + pRotMatrix.b2 - pRotMatrix.a1 - pRotMatrix.c3) * static_cast<TReal>(2.0); TReal s = std::sqrt( static_cast<TReal>(1.0) + pRotMatrix.b2 - pRotMatrix.a1 - pRotMatrix.c3) * static_cast<TReal>(2.0);
x = (pRotMatrix.b1 + pRotMatrix.a2) / s; x = (pRotMatrix.b1 + pRotMatrix.a2) / s;
y = static_cast<TReal>(0.25) * s; y = static_cast<TReal>(0.25) * s;
z = (pRotMatrix.c2 + pRotMatrix.b3) / s; z = (pRotMatrix.c2 + pRotMatrix.b3) / s;
w = (pRotMatrix.a3 - pRotMatrix.c1) / s; w = (pRotMatrix.a3 - pRotMatrix.c1) / s;
} else } else
{ {
// Column 2: // Column 2:
TReal s = std::sqrt( static_cast<TReal>(1.0) + pRotMatrix.c3 - pRotMatrix.a1 - pRotMatrix.b2) * static_cast<TReal>(2.0); TReal s = std::sqrt( static_cast<TReal>(1.0) + pRotMatrix.c3 - pRotMatrix.a1 - pRotMatrix.b2) * static_cast<TReal>(2.0);
x = (pRotMatrix.a3 + pRotMatrix.c1) / s; x = (pRotMatrix.a3 + pRotMatrix.c1) / s;
@ -188,7 +188,7 @@ inline aiQuaterniont<TReal>::aiQuaterniont( aiVector3t<TReal> normalized)
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Performs a spherical interpolation between two quaternions // Performs a spherical interpolation between two quaternions
// Implementation adopted from the gmtl project. All others I found on the net fail in some cases. // Implementation adopted from the gmtl project. All others I found on the net fail in some cases.
// Congrats, gmtl! // Congrats, gmtl!
template<typename TReal> template<typename TReal>
@ -206,7 +206,7 @@ inline void aiQuaterniont<TReal>::Interpolate( aiQuaterniont& pOut, const aiQuat
end.y = -end.y; end.y = -end.y;
end.z = -end.z; end.z = -end.z;
end.w = -end.w; end.w = -end.w;
} }
// Calculate coefficients // Calculate coefficients
TReal sclp, sclq; TReal sclp, sclq;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -60,29 +60,29 @@ extern "C" {
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
/** A node in the imported hierarchy. /** A node in the imported hierarchy.
* *
* Each node has name, a parent node (except for the root node), * Each node has name, a parent node (except for the root node),
* a transformation relative to its parent and possibly several child nodes. * a transformation relative to its parent and possibly several child nodes.
* Simple file formats don't support hierarchical structures - for these formats * Simple file formats don't support hierarchical structures - for these formats
* the imported scene does consist of only a single root node without children. * the imported scene does consist of only a single root node without children.
*/ */
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
struct aiNode struct aiNode
{ {
/** The name of the node. /** The name of the node.
* *
* The name might be empty (length of zero) but all nodes which * The name might be empty (length of zero) but all nodes which
* need to be referenced by either bones or animations are named. * need to be referenced by either bones or animations are named.
* Multiple nodes may have the same name, except for nodes which are referenced * Multiple nodes may have the same name, except for nodes which are referenced
* by bones (see #aiBone and #aiMesh::mBones). Their names *must* be unique. * by bones (see #aiBone and #aiMesh::mBones). Their names *must* be unique.
* *
* Cameras and lights reference a specific node by name - if there * Cameras and lights reference a specific node by name - if there
* are multiple nodes with this name, they are assigned to each of them. * are multiple nodes with this name, they are assigned to each of them.
* <br> * <br>
* There are no limitations with regard to the characters contained in * There are no limitations with regard to the characters contained in
* the name string as it is usually taken directly from the source file. * the name string as it is usually taken directly from the source file.
* *
* Implementations should be able to handle tokens such as whitespace, tabs, * Implementations should be able to handle tokens such as whitespace, tabs,
* line feeds, quotation marks, ampersands etc. * line feeds, quotation marks, ampersands etc.
* *
@ -115,13 +115,13 @@ struct aiNode
/** Metadata associated with this node or NULL if there is no metadata. /** Metadata associated with this node or NULL if there is no metadata.
* Whether any metadata is generated depends on the source file format. See the * Whether any metadata is generated depends on the source file format. See the
* @link importer_notes @endlink page for more information on every source file * @link importer_notes @endlink page for more information on every source file
* format. Importers that don't document any metadata don't write any. * format. Importers that don't document any metadata don't write any.
*/ */
C_STRUCT aiMetadata* mMetaData; C_STRUCT aiMetadata* mMetaData;
#ifdef __cplusplus #ifdef __cplusplus
/** Constructor */ /** Constructor */
aiNode() aiNode()
// set all members to zero by default // set all members to zero by default
: mName("") : mName("")
, mParent(NULL) , mParent(NULL)
@ -132,10 +132,10 @@ struct aiNode
, mMetaData(NULL) , mMetaData(NULL)
{ {
} }
/** Construction from a specific name */ /** Construction from a specific name */
aiNode(const std::string& name) aiNode(const std::string& name)
// set all members to zero by default // set all members to zero by default
: mName(name) : mName(name)
, mParent(NULL) , mParent(NULL)
@ -152,7 +152,7 @@ struct aiNode
{ {
// delete all children recursively // delete all children recursively
// to make sure we won't crash if the data is invalid ... // to make sure we won't crash if the data is invalid ...
if (mChildren && mNumChildren) if (mChildren && mNumChildren)
{ {
for( unsigned int a = 0; a < mNumChildren; a++) for( unsigned int a = 0; a < mNumChildren; a++)
delete mChildren[a]; delete mChildren[a];
@ -166,7 +166,7 @@ struct aiNode
/** Searches for a node with a specific name, beginning at this /** Searches for a node with a specific name, beginning at this
* nodes. Normally you will call this method on the root node * nodes. Normally you will call this method on the root node
* of the scene. * of the scene.
* *
* @param name Name to search for * @param name Name to search for
* @return NULL or a valid Node if the search was successful. * @return NULL or a valid Node if the search was successful.
*/ */
@ -196,7 +196,7 @@ struct aiNode
return NULL; return NULL;
} }
inline aiNode* FindNode(const char* name) inline aiNode* FindNode(const char* name)
{ {
if (!::strcmp( mName.data,name))return this; if (!::strcmp( mName.data,name))return this;
for (unsigned int i = 0; i < mNumChildren;++i) for (unsigned int i = 0; i < mNumChildren;++i)
@ -217,9 +217,9 @@ struct aiNode
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
/** /**
* Specifies that the scene data structure that was imported is not complete. * Specifies that the scene data structure that was imported is not complete.
* This flag bypasses some internal validations and allows the import * This flag bypasses some internal validations and allows the import
* of animation skeletons, material libraries or camera animation paths * of animation skeletons, material libraries or camera animation paths
* using Assimp. Most applications won't support such data. * using Assimp. Most applications won't support such data.
*/ */
#define AI_SCENE_FLAGS_INCOMPLETE 0x1 #define AI_SCENE_FLAGS_INCOMPLETE 0x1
@ -233,7 +233,7 @@ struct aiNode
/** /**
* This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS) * This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
* if the validation is successful but some issues have been found. * if the validation is successful but some issues have been found.
* This can for example mean that a texture that does not exist is referenced * This can for example mean that a texture that does not exist is referenced
* by a material or that the bone weights for a vertex don't sum to 1.0 ... . * by a material or that the bone weights for a vertex don't sum to 1.0 ... .
* In most cases you should still be able to use the import. This flag could * In most cases you should still be able to use the import. This flag could
* be useful for applications which don't capture Assimp's log output. * be useful for applications which don't capture Assimp's log output.
@ -249,8 +249,8 @@ struct aiNode
#define AI_SCENE_FLAGS_NON_VERBOSE_FORMAT 0x8 #define AI_SCENE_FLAGS_NON_VERBOSE_FORMAT 0x8
/** /**
* Denotes pure height-map terrain data. Pure terrains usually consist of quads, * Denotes pure height-map terrain data. Pure terrains usually consist of quads,
* sometimes triangles, in a regular grid. The x,y coordinates of all vertex * sometimes triangles, in a regular grid. The x,y coordinates of all vertex
* positions refer to the x,y coordinates on the terrain height map, the z-axis * positions refer to the x,y coordinates on the terrain height map, the z-axis
* stores the elevation at a specific point. * stores the elevation at a specific point.
* *
@ -264,8 +264,8 @@ struct aiNode
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
/** The root structure of the imported data. /** The root structure of the imported data.
* *
* Everything that was imported from the given file can be accessed from here. * Everything that was imported from the given file can be accessed from here.
* Objects of this class are generally maintained and owned by Assimp, not * Objects of this class are generally maintained and owned by Assimp, not
* by the caller. You shouldn't want to instance it, nor should you ever try to * by the caller. You shouldn't want to instance it, nor should you ever try to
@ -275,19 +275,19 @@ struct aiNode
struct aiScene struct aiScene
{ {
/** Any combination of the AI_SCENE_FLAGS_XXX flags. By default /** Any combination of the AI_SCENE_FLAGS_XXX flags. By default
* this value is 0, no flags are set. Most applications will * this value is 0, no flags are set. Most applications will
* want to reject all scenes with the AI_SCENE_FLAGS_INCOMPLETE * want to reject all scenes with the AI_SCENE_FLAGS_INCOMPLETE
* bit set. * bit set.
*/ */
unsigned int mFlags; unsigned int mFlags;
/** The root node of the hierarchy. /** The root node of the hierarchy.
* *
* There will always be at least the root node if the import * There will always be at least the root node if the import
* was successful (and no special flags have been set). * was successful (and no special flags have been set).
* Presence of further nodes depends on the format and content * Presence of further nodes depends on the format and content
* of the imported file. * of the imported file.
*/ */
C_STRUCT aiNode* mRootNode; C_STRUCT aiNode* mRootNode;
@ -297,11 +297,11 @@ struct aiScene
/** The number of meshes in the scene. */ /** The number of meshes in the scene. */
unsigned int mNumMeshes; unsigned int mNumMeshes;
/** The array of meshes. /** The array of meshes.
* *
* Use the indices given in the aiNode structure to access * Use the indices given in the aiNode structure to access
* this array. The array is mNumMeshes in size. If the * this array. The array is mNumMeshes in size. If the
* AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always * AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always
* be at least ONE material. * be at least ONE material.
*/ */
C_STRUCT aiMesh** mMeshes; C_STRUCT aiMesh** mMeshes;
@ -311,11 +311,11 @@ struct aiScene
/** The number of materials in the scene. */ /** The number of materials in the scene. */
unsigned int mNumMaterials; unsigned int mNumMaterials;
/** The array of materials. /** The array of materials.
* *
* Use the index given in each aiMesh structure to access this * Use the index given in each aiMesh structure to access this
* array. The array is mNumMaterials in size. If the * array. The array is mNumMaterials in size. If the
* AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always * AI_SCENE_FLAGS_INCOMPLETE flag is not set there will always
* be at least ONE material. * be at least ONE material.
*/ */
C_STRUCT aiMaterial** mMaterials; C_STRUCT aiMaterial** mMaterials;
@ -323,9 +323,9 @@ struct aiScene
/** The number of animations in the scene. */ /** The number of animations in the scene. */
unsigned int mNumAnimations; unsigned int mNumAnimations;
/** The array of animations. /** The array of animations.
* *
* All animations imported from the given file are listed here. * All animations imported from the given file are listed here.
* The array is mNumAnimations in size. * The array is mNumAnimations in size.
@ -338,7 +338,7 @@ struct aiScene
unsigned int mNumTextures; unsigned int mNumTextures;
/** The array of embedded textures. /** The array of embedded textures.
* *
* Not many file formats embed their textures into the file. * Not many file formats embed their textures into the file.
* An example is Quake's MDL format (which is also used by * An example is Quake's MDL format (which is also used by
* some GameStudio versions) * some GameStudio versions)
@ -347,12 +347,12 @@ struct aiScene
/** The number of light sources in the scene. Light sources /** The number of light sources in the scene. Light sources
* are fully optional, in most cases this attribute will be 0 * are fully optional, in most cases this attribute will be 0
*/ */
unsigned int mNumLights; unsigned int mNumLights;
/** The array of light sources. /** The array of light sources.
* *
* All light sources imported from the given file are * All light sources imported from the given file are
* listed here. The array is mNumLights in size. * listed here. The array is mNumLights in size.
*/ */
@ -360,12 +360,12 @@ struct aiScene
/** The number of cameras in the scene. Cameras /** The number of cameras in the scene. Cameras
* are fully optional, in most cases this attribute will be 0 * are fully optional, in most cases this attribute will be 0
*/ */
unsigned int mNumCameras; unsigned int mNumCameras;
/** The array of cameras. /** The array of cameras.
* *
* All cameras imported from the given file are listed here. * All cameras imported from the given file are listed here.
* The array is mNumCameras in size. The first camera in the * The array is mNumCameras in size. The first camera in the
* array (if existing) is the default camera view into * array (if existing) is the default camera view into
@ -383,28 +383,28 @@ struct aiScene
//! Check whether the scene contains meshes //! Check whether the scene contains meshes
//! Unless no special scene flags are set this will always be true. //! Unless no special scene flags are set this will always be true.
inline bool HasMeshes() const inline bool HasMeshes() const
{ return mMeshes != NULL && mNumMeshes > 0; } { return mMeshes != NULL && mNumMeshes > 0; }
//! Check whether the scene contains materials //! Check whether the scene contains materials
//! Unless no special scene flags are set this will always be true. //! Unless no special scene flags are set this will always be true.
inline bool HasMaterials() const inline bool HasMaterials() const
{ return mMaterials != NULL && mNumMaterials > 0; } { return mMaterials != NULL && mNumMaterials > 0; }
//! Check whether the scene contains lights //! Check whether the scene contains lights
inline bool HasLights() const inline bool HasLights() const
{ return mLights != NULL && mNumLights > 0; } { return mLights != NULL && mNumLights > 0; }
//! Check whether the scene contains textures //! Check whether the scene contains textures
inline bool HasTextures() const inline bool HasTextures() const
{ return mTextures != NULL && mNumTextures > 0; } { return mTextures != NULL && mNumTextures > 0; }
//! Check whether the scene contains cameras //! Check whether the scene contains cameras
inline bool HasCameras() const inline bool HasCameras() const
{ return mCameras != NULL && mNumCameras > 0; } { return mCameras != NULL && mNumCameras > 0; }
//! Check whether the scene contains animations //! Check whether the scene contains animations
inline bool HasAnimations() const inline bool HasAnimations() const
{ return mAnimations != NULL && mNumAnimations > 0; } { return mAnimations != NULL && mNumAnimations > 0; }
#endif // __cplusplus #endif // __cplusplus

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -60,7 +60,7 @@ extern "C" {
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** @def AI_MAKE_EMBEDDED_TEXNAME /** @def AI_MAKE_EMBEDDED_TEXNAME
* Used to build the reserved path name used by the material system to * Used to build the reserved path name used by the material system to
* reference textures that are embedded into their corresponding * reference textures that are embedded into their corresponding
* model files. The parameter specifies the index of the texture * model files. The parameter specifies the index of the texture
* (zero-based, in the aiScene::mTextures array) * (zero-based, in the aiScene::mTextures array)
@ -74,7 +74,7 @@ extern "C" {
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** @brief Helper structure to represent a texel in a ARGB8888 format /** @brief Helper structure to represent a texel in a ARGB8888 format
* *
* Used by aiTexture. * Used by aiTexture.
*/ */
struct aiTexel struct aiTexel
@ -109,11 +109,11 @@ struct aiTexel
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/** Helper structure to describe an embedded texture /** Helper structure to describe an embedded texture
* *
* Normally textures are contained in external files but some file formats embed * Normally textures are contained in external files but some file formats embed
* them directly in the model file. There are two types of embedded textures: * them directly in the model file. There are two types of embedded textures:
* 1. Uncompressed textures. The color data is given in an uncompressed format. * 1. Uncompressed textures. The color data is given in an uncompressed format.
* 2. Compressed textures stored in a file format like png or jpg. The raw file * 2. Compressed textures stored in a file format like png or jpg. The raw file
* bytes are given so the application must utilize an image decoder (e.g. DevIL) to * bytes are given so the application must utilize an image decoder (e.g. DevIL) to
* get access to the actual color data. * get access to the actual color data.
*/ */
@ -140,8 +140,8 @@ struct aiTexture
* If mHeight != 0 this member is undefined. Otherwise it * If mHeight != 0 this member is undefined. Otherwise it
* is set 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 * information about the texture file format used OR the
* file extension of the format without a trailing dot. If there * file extension of the format without a trailing dot. If there
* are multiple file extensions for a format, the shortest * are multiple file extensions for a format, the shortest
* extension is chosen (JPEG maps to 'jpg', not to 'jpeg'). * extension is chosen (JPEG maps to 'jpg', not to 'jpeg').
* E.g. 'dds\\0', 'pcx\\0', 'jpg\\0'. All characters are lower-case. * E.g. 'dds\\0', 'pcx\\0', 'jpg\\0'. All characters are lower-case.
* The fourth character will always be '\\0'. * The fourth character will always be '\\0'.

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,22 +25,22 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
/** @file types.h /** @file types.h
* Basic data types and primitives, such as vectors or colors. * Basic data types and primitives, such as vectors or colors.
*/ */
#ifndef AI_TYPES_H_INC #ifndef AI_TYPES_H_INC
#define AI_TYPES_H_INC #define AI_TYPES_H_INC
@ -73,7 +73,7 @@ namespace Assimp {
//! @cond never //! @cond never
namespace Intern { namespace Intern {
// -------------------------------------------------------------------- // --------------------------------------------------------------------
/** @brief Internal helper class to utilize our internal new/delete /** @brief Internal helper class to utilize our internal new/delete
* routines for allocating object of this and derived classes. * routines for allocating object of this and derived classes.
* *
* By doing this you can safely share class objects between Assimp * By doing this you can safely share class objects between Assimp
@ -124,7 +124,7 @@ struct aiPlane
{ {
#ifdef __cplusplus #ifdef __cplusplus
aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {} aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {}
aiPlane (float _a, float _b, float _c, float _d) aiPlane (float _a, float _b, float _c, float _d)
: a(_a), b(_b), c(_c), d(_d) {} : a(_a), b(_b), c(_c), d(_d) {}
aiPlane (const aiPlane& o) : a(o.a), b(o.b), c(o.c), d(o.d) {} aiPlane (const aiPlane& o) : a(o.a), b(o.b), c(o.c), d(o.d) {}
@ -154,7 +154,7 @@ struct aiRay
} PACK_STRUCT; // !struct aiRay } PACK_STRUCT; // !struct aiRay
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** Represents a color in Red-Green-Blue space. /** Represents a color in Red-Green-Blue space.
*/ */
struct aiColor3D struct aiColor3D
{ {
@ -163,7 +163,7 @@ struct aiColor3D
aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {} aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
aiColor3D (float _r) : r(_r), g(_r), b(_r) {} aiColor3D (float _r) : r(_r), g(_r), b(_r) {}
aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {} aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
/** Component-wise comparison */ /** Component-wise comparison */
// TODO: add epsilon? // TODO: add epsilon?
bool operator == (const aiColor3D& other) const bool operator == (const aiColor3D& other) const
@ -198,7 +198,7 @@ struct aiColor3D
aiColor3D operator*(const aiColor3D& c) const { aiColor3D operator*(const aiColor3D& c) const {
return aiColor3D(r*c.r,g*c.g,b*c.b); return aiColor3D(r*c.r,g*c.g,b*c.b);
} }
/** Multiply with a scalar */ /** Multiply with a scalar */
aiColor3D operator*(float f) const { aiColor3D operator*(float f) const {
return aiColor3D(r*f,g*f,b*f); return aiColor3D(r*f,g*f,b*f);
@ -233,18 +233,18 @@ struct aiColor3D
* The character set of an aiString is explicitly defined to be UTF-8. This Unicode * The character set of an aiString is explicitly defined to be UTF-8. This Unicode
* transformation was chosen in the belief that most strings in 3d files are limited * transformation was chosen in the belief that most strings in 3d files are limited
* to ASCII, thus the character set needed to be strictly ASCII compatible. * to ASCII, thus the character set needed to be strictly ASCII compatible.
* *
* Most text file loaders provide proper Unicode input file handling, special unicode * Most text file loaders provide proper Unicode input file handling, special unicode
* characters are correctly transcoded to UTF8 and are kept throughout the libraries' * characters are correctly transcoded to UTF8 and are kept throughout the libraries'
* import pipeline. * import pipeline.
* *
* For most applications, it will be absolutely sufficient to interpret the * For most applications, it will be absolutely sufficient to interpret the
* aiString as ASCII data and work with it as one would work with a plain char*. * aiString as ASCII data and work with it as one would work with a plain char*.
* Windows users in need of proper support for i.e asian characters can use the * Windows users in need of proper support for i.e asian characters can use the
* MultiByteToWideChar(), WideCharToMultiByte() WinAPI functionality to convert the * MultiByteToWideChar(), WideCharToMultiByte() WinAPI functionality to convert the
* UTF-8 strings to their working character set (i.e. MBCS, WideChar). * UTF-8 strings to their working character set (i.e. MBCS, WideChar).
* *
* We use this representation instead of std::string to be C-compatible. The * We use this representation instead of std::string to be C-compatible. The
* (binary) length of such a string is limited to MAXLEN characters (including the * (binary) length of such a string is limited to MAXLEN characters (including the
* the terminating zero). * the terminating zero).
*/ */
@ -253,7 +253,7 @@ struct aiString
#ifdef __cplusplus #ifdef __cplusplus
/** Default constructor, the string is set to have zero length */ /** Default constructor, the string is set to have zero length */
aiString() : aiString() :
length(0) length(0)
{ {
data[0] = '\0'; data[0] = '\0';
@ -264,8 +264,8 @@ struct aiString
} }
/** Copy constructor */ /** Copy constructor */
aiString(const aiString& rOther) : aiString(const aiString& rOther) :
length(rOther.length) length(rOther.length)
{ {
// Crop the string to the maximum length // Crop the string to the maximum length
length = length>=MAXLEN?MAXLEN-1:length; length = length>=MAXLEN?MAXLEN-1:length;
@ -274,8 +274,8 @@ struct aiString
} }
/** Constructor from std::string */ /** Constructor from std::string */
explicit aiString(const std::string& pString) : explicit aiString(const std::string& pString) :
length(pString.length()) length(pString.length())
{ {
length = length>=MAXLEN?MAXLEN-1:length; length = length>=MAXLEN?MAXLEN-1:length;
memcpy( data, pString.c_str(), length); memcpy( data, pString.c_str(), length);
@ -357,7 +357,7 @@ struct aiString
#endif // !__cplusplus #endif // !__cplusplus
/** Binary length of the string excluding the terminal 0. This is NOT the /** Binary length of the string excluding the terminal 0. This is NOT the
* logical length of strings containing UTF-8 multibyte sequences! It's * logical length of strings containing UTF-8 multibyte sequences! It's
* the number of bytes from the beginning of the string to its end.*/ * the number of bytes from the beginning of the string to its end.*/
size_t length; size_t length;
@ -380,14 +380,14 @@ typedef enum aiReturn
aiReturn_FAILURE = -0x1, aiReturn_FAILURE = -0x1,
/** Indicates that not enough memory was available /** Indicates that not enough memory was available
* to perform the requested operation * to perform the requested operation
*/ */
aiReturn_OUTOFMEMORY = -0x3, aiReturn_OUTOFMEMORY = -0x3,
/** @cond never /** @cond never
* Force 32-bit size enum * Force 32-bit size enum
*/ */
_AI_ENFORCE_ENUM_SIZE = 0x7fffffff _AI_ENFORCE_ENUM_SIZE = 0x7fffffff
/// @endcond /// @endcond
} aiReturn; // !enum aiReturn } aiReturn; // !enum aiReturn
@ -404,28 +404,28 @@ typedef enum aiReturn
enum aiOrigin enum aiOrigin
{ {
/** Beginning of the file */ /** Beginning of the file */
aiOrigin_SET = 0x0, aiOrigin_SET = 0x0,
/** Current position of the file pointer */ /** Current position of the file pointer */
aiOrigin_CUR = 0x1, aiOrigin_CUR = 0x1,
/** End of the file, offsets must be negative */ /** End of the file, offsets must be negative */
aiOrigin_END = 0x2, aiOrigin_END = 0x2,
/** @cond never /** @cond never
* Force 32-bit size enum * Force 32-bit size enum
*/ */
_AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff _AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff
/// @endcond /// @endcond
}; // !enum aiOrigin }; // !enum aiOrigin
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** @brief Enumerates predefined log streaming destinations. /** @brief Enumerates predefined log streaming destinations.
* Logging to these streams can be enabled with a single call to * Logging to these streams can be enabled with a single call to
* #LogStream::createDefaultStream. * #LogStream::createDefaultStream.
*/ */
enum aiDefaultLogStream enum aiDefaultLogStream
{ {
/** Stream the log to a file */ /** Stream the log to a file */
aiDefaultLogStream_FILE = 0x1, aiDefaultLogStream_FILE = 0x1,
@ -441,10 +441,10 @@ enum aiDefaultLogStream
*/ */
aiDefaultLogStream_DEBUGGER = 0x8, aiDefaultLogStream_DEBUGGER = 0x8,
/** @cond never /** @cond never
* Force 32-bit size enum * Force 32-bit size enum
*/ */
_AI_DLS_ENFORCE_ENUM_SIZE = 0x7fffffff _AI_DLS_ENFORCE_ENUM_SIZE = 0x7fffffff
/// @endcond /// @endcond
}; // !enum aiDefaultLogStream }; // !enum aiDefaultLogStream
@ -500,7 +500,7 @@ struct aiMemoryInfo
/** Total storage allocated for the full import. */ /** Total storage allocated for the full import. */
unsigned int total; unsigned int total;
}; // !struct aiMemoryInfo }; // !struct aiMemoryInfo
#ifdef __cplusplus #ifdef __cplusplus
} }
@ -513,4 +513,4 @@ struct aiMemoryInfo
#include "quaternion.inl" #include "quaternion.inl"
#include "matrix3x3.inl" #include "matrix3x3.inl"
#include "matrix4x4.inl" #include "matrix4x4.inl"
#endif #endif

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "./Compiler/pushpack1.h" #include "./Compiler/pushpack1.h"
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** Represents a two-dimensional vector. /** Represents a two-dimensional vector.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -95,7 +95,7 @@ public:
template <typename TOther> template <typename TOther>
operator aiVector2t<TOther> () const; operator aiVector2t<TOther> () const;
TReal x, y; TReal x, y;
} PACK_STRUCT; } PACK_STRUCT;
typedef aiVector2t<float> aiVector2D; typedef aiVector2t<float> aiVector2D;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -58,14 +58,14 @@ aiVector2t<TReal>::operator aiVector2t<TOther> () const {
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
void aiVector2t<TReal>::Set( TReal pX, TReal pY) { void aiVector2t<TReal>::Set( TReal pX, TReal pY) {
x = pX; y = pY; x = pX; y = pY;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
TReal aiVector2t<TReal>::SquareLength() const { TReal aiVector2t<TReal>::SquareLength() const {
return x*x + y*y; return x*x + y*y;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -76,37 +76,37 @@ TReal aiVector2t<TReal>::Length() const {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
aiVector2t<TReal>& aiVector2t<TReal>::Normalize() { aiVector2t<TReal>& aiVector2t<TReal>::Normalize() {
*this /= Length(); *this /= Length();
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
const aiVector2t<TReal>& aiVector2t<TReal>::operator += (const aiVector2t& o) { const aiVector2t<TReal>& aiVector2t<TReal>::operator += (const aiVector2t& o) {
x += o.x; y += o.y; x += o.x; y += o.y;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
const aiVector2t<TReal>& aiVector2t<TReal>::operator -= (const aiVector2t& o) { const aiVector2t<TReal>& aiVector2t<TReal>::operator -= (const aiVector2t& o) {
x -= o.x; y -= o.y; x -= o.x; y -= o.y;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) { const aiVector2t<TReal>& aiVector2t<TReal>::operator *= (TReal f) {
x *= f; y *= f; x *= f; y *= f;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) { const aiVector2t<TReal>& aiVector2t<TReal>::operator /= (TReal f) {
x /= f; y /= f; x /= f; y /= f;
return *this; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -220,5 +220,5 @@ inline aiVector2t<TReal> operator - ( const aiVector2t<TReal>& v)
return aiVector2t<TReal>( -v.x, -v.y); return aiVector2t<TReal>( -v.x, -v.y);
} }
#endif #endif
#endif #endif

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -60,7 +60,7 @@ template<typename TReal> class aiMatrix4x4t;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Represents a three-dimensional vector. */ /** Represents a three-dimensional vector. */
template <typename TReal> template <typename TReal>
class aiVector3t class aiVector3t
{ {
public: public:
@ -116,14 +116,14 @@ public:
/** @brief Normalize the vector */ /** @brief Normalize the vector */
aiVector3t& Normalize(); aiVector3t& Normalize();
/** @brief Componentwise multiplication of two vectors /** @brief Componentwise multiplication of two vectors
* *
* Note that vec*vec yields the dot product. * Note that vec*vec yields the dot product.
* @param o Second factor */ * @param o Second factor */
const aiVector3t SymMul(const aiVector3t& o); const aiVector3t SymMul(const aiVector3t& o);
TReal x, y, z; TReal x, y, z;
} PACK_STRUCT; } PACK_STRUCT;

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -81,13 +81,13 @@ aiVector3t<TReal>::operator aiVector3t<TOther> () const {
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE void aiVector3t<TReal>::Set( TReal pX, TReal pY, TReal pZ) { AI_FORCE_INLINE void aiVector3t<TReal>::Set( TReal pX, TReal pY, TReal pZ) {
x = pX; y = pY; z = pZ; x = pX; y = pY; z = pZ;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE TReal aiVector3t<TReal>::SquareLength() const { AI_FORCE_INLINE TReal aiVector3t<TReal>::SquareLength() const {
return x*x + y*y + z*z; return x*x + y*y + z*z;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
@ -96,13 +96,13 @@ AI_FORCE_INLINE TReal aiVector3t<TReal>::Length() const {
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::Normalize() { AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::Normalize() {
*this /= Length(); return *this; *this /= Length(); return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator += (const aiVector3t<TReal>& o) { AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator += (const aiVector3t<TReal>& o) {
x += o.x; y += o.y; z += o.z; return *this; x += o.x; y += o.y; z += o.z; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
@ -112,12 +112,12 @@ AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator -= (const a
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator *= (TReal f) { AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator *= (TReal f) {
x *= f; y *= f; z *= f; return *this; x *= f; y *= f; z *= f; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>
AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator /= (TReal f) { AI_FORCE_INLINE const aiVector3t<TReal>& aiVector3t<TReal>::operator /= (TReal f) {
x /= f; y /= f; z /= f; return *this; x /= f; y /= f; z /= f; return *this;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
template <typename TReal> template <typename TReal>

View File

@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
All rights reserved. All rights reserved.
Redistribution and use of this software in source and binary forms, Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following with or without modification, are permitted provided that the following
conditions are met: conditions are met:
* Redistributions of source code must retain the above * Redistributions of source code must retain the above
@ -25,16 +25,16 @@ conditions are met:
derived from this software without specific prior derived from this software without specific prior
written permission of the assimp team. written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
@ -53,7 +53,7 @@ extern "C" {
#endif #endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Returns a string with legal copyright and licensing information /** @brief Returns a string with legal copyright and licensing information
* about Assimp. The string may include multiple lines. * about Assimp. The string may include multiple lines.
* @return Pointer to static string. * @return Pointer to static string.
*/ */
@ -75,13 +75,13 @@ ASSIMP_API unsigned int aiGetVersionMajor (void);
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Returns the repository revision of the Assimp runtime. /** @brief Returns the repository revision of the Assimp runtime.
* @return SVN Repository revision number of the Assimp runtime the * @return SVN Repository revision number of the Assimp runtime the
* application was linked/built against. * application was linked/built against.
*/ */
ASSIMP_API unsigned int aiGetVersionRevision (void); ASSIMP_API unsigned int aiGetVersionRevision (void);
//! Assimp was compiled as a shared object (Windows: DLL) //! Assimp was compiled as a shared object (Windows: DLL)
#define ASSIMP_CFLAGS_SHARED 0x1 #define ASSIMP_CFLAGS_SHARED 0x1
//! Assimp was compiled against STLport //! Assimp was compiled against STLport
#define ASSIMP_CFLAGS_STLPORT 0x2 #define ASSIMP_CFLAGS_STLPORT 0x2
//! Assimp was compiled as a debug build //! Assimp was compiled as a debug build