瀏覽代碼

Merge branch 'master' into globalscale-registry

Kim Kulling 7 年之前
父節點
當前提交
1b53c26943

+ 1 - 13
code/Importer.cpp

@@ -190,7 +190,7 @@ Importer::~Importer()
     delete pimpl->mIOHandler;
     delete pimpl->mProgressHandler;
 
-    // Kill imported scene. Destructors should do that recursivly
+    // Kill imported scene. Destructor's should do that recursively
     delete pimpl->mScene;
 
     // Delete shared post-processing data
@@ -200,18 +200,6 @@ Importer::~Importer()
     delete pimpl;
 }
 
-// ------------------------------------------------------------------------------------------------
-// Copy constructor - copies the config of another Importer, not the scene
-Importer::Importer(const Importer &other)
-	: pimpl(NULL) {
-    new(this) Importer();
-
-    pimpl->mIntProperties    = other.pimpl->mIntProperties;
-    pimpl->mFloatProperties  = other.pimpl->mFloatProperties;
-    pimpl->mStringProperties = other.pimpl->mStringProperties;
-    pimpl->mMatrixProperties = other.pimpl->mMatrixProperties;
-}
-
 // ------------------------------------------------------------------------------------------------
 // Register a custom post-processing step
 aiReturn Importer::RegisterPPStep(BaseProcess* pImp)

+ 2 - 27
code/glTF2Asset.h

@@ -137,7 +137,7 @@ namespace glTF2
     // Vec/matrix types, as raw float arrays
     typedef float (vec3)[3];
     typedef float (vec4)[4];
-	typedef float (mat4)[16];
+    typedef float (mat4)[16];
 
     namespace Util
     {
@@ -166,33 +166,8 @@ namespace glTF2
 
     //! Magic number for GLB files
 	#define AI_GLB_MAGIC_NUMBER "glTF"
+	#include <assimp/pbrmaterial.h>
 
-    #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR "$mat.gltf.pbrMetallicRoughness.baseColorFactor", 0, 0
-	#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR "$mat.gltf.pbrMetallicRoughness.metallicFactor", 0, 0
-	#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR "$mat.gltf.pbrMetallicRoughness.roughnessFactor", 0, 0
-    #define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE aiTextureType_DIFFUSE, 1
-	#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE aiTextureType_UNKNOWN, 0
-	#define AI_MATKEY_GLTF_ALPHAMODE "$mat.gltf.alphaMode", 0, 0
-	#define AI_MATKEY_GLTF_ALPHACUTOFF "$mat.gltf.alphaCutoff", 0, 0
-	#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS "$mat.gltf.pbrSpecularGlossiness", 0, 0
-	#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR "$mat.gltf.pbrMetallicRoughness.glossinessFactor", 0, 0
-
-	#define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE "$tex.file.texCoord"
-	#define _AI_MATKEY_GLTF_MAPPINGNAME_BASE "$tex.mappingname"
-	#define _AI_MATKEY_GLTF_MAPPINGID_BASE "$tex.mappingid"
-	#define _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE "$tex.mappingfiltermag"
-	#define _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE "$tex.mappingfiltermin"
-    #define _AI_MATKEY_GLTF_SCALE_BASE "$tex.scale"
-    #define _AI_MATKEY_GLTF_STRENGTH_BASE "$tex.strength"
-
-	#define AI_MATKEY_GLTF_TEXTURE_TEXCOORD _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, type, N
-	#define AI_MATKEY_GLTF_MAPPINGNAME(type, N) _AI_MATKEY_GLTF_MAPPINGNAME_BASE, type, N
-	#define AI_MATKEY_GLTF_MAPPINGID(type, N) _AI_MATKEY_GLTF_MAPPINGID_BASE, type, N
-	#define AI_MATKEY_GLTF_MAPPINGFILTER_MAG(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, type, N
-	#define AI_MATKEY_GLTF_MAPPINGFILTER_MIN(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, type, N
-    #define AI_MATKEY_GLTF_TEXTURE_SCALE(type, N) _AI_MATKEY_GLTF_SCALE_BASE, type, N
-    #define AI_MATKEY_GLTF_TEXTURE_STRENGTH(type, N) _AI_MATKEY_GLTF_STRENGTH_BASE, type, N
-    
     #ifdef ASSIMP_API
         #include "./../include/assimp/Compiler/pushpack1.h"
     #endif

+ 1 - 1
include/assimp/Importer.hpp

@@ -137,7 +137,7 @@ public:
      * If this Importer owns a scene it won't be copied.
      * Call ReadFile() to start the import process.
      */
-    Importer(const Importer& other);
+    Importer(const Importer& other)=delete;
 
     // -------------------------------------------------------------------
     /** Assignment operator has been deleted

+ 3 - 3
include/assimp/MemoryIOWrapper.h

@@ -99,19 +99,19 @@ public:
     // Seek specific position
     aiReturn Seek(size_t pOffset, aiOrigin pOrigin) {
         if (aiOrigin_SET == pOrigin) {
-            if (pOffset >= length) {
+            if (pOffset > length) {
                 return AI_FAILURE;
             }
             pos = pOffset;
         }
         else if (aiOrigin_END == pOrigin) {
-            if (pOffset >= length) {
+            if (pOffset > length) {
                 return AI_FAILURE;
             }
             pos = length-pOffset;
         }
         else {
-            if (pOffset+pos >= length) {
+            if (pOffset+pos > length) {
                 return AI_FAILURE;
             }
             pos += pOffset;

+ 10 - 8
include/assimp/SpatialSort.h

@@ -47,8 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <vector>
 #include <assimp/types.h>
 
-namespace Assimp
-{
+namespace Assimp {
 
 // ------------------------------------------------------------------------------------------------
 /** A little helper class to quickly find all vertices in the epsilon environment of a given
@@ -148,17 +147,20 @@ protected:
     aiVector3D mPlaneNormal;
 
     /** An entry in a spatially sorted position array. Consists of a vertex index,
-     * its position and its precalculated distance from the reference plane */
-    struct Entry
-    {
+     * its position and its pre-calculated distance from the reference plane */
+    struct Entry {
         unsigned int mIndex; ///< The vertex referred by this entry
         aiVector3D mPosition; ///< Position
         ai_real mDistance; ///< Distance of this vertex to the sorting plane
 
-        Entry() { /** intentionally not initialized.*/ }
+        Entry()
+        : mIndex( 999999999 ), mPosition(), mDistance( 99999. ) {
+            // empty        
+        }
         Entry( unsigned int pIndex, const aiVector3D& pPosition, ai_real pDistance)
-            : mIndex( pIndex), mPosition( pPosition), mDistance( pDistance)
-        {   }
+        : mIndex( pIndex), mPosition( pPosition), mDistance( pDistance) {
+            // empty
+        }
 
         bool operator < (const Entry& e) const { return mDistance < e.mDistance; }
     };

+ 72 - 82
include/assimp/fast_atof.h

@@ -59,69 +59,65 @@ const double fast_atof_table[16] =  {  // we write [16] here instead of [] to wo
 // ------------------------------------------------------------------------------------
 // Convert a string in decimal format to a number
 // ------------------------------------------------------------------------------------
-inline unsigned int strtoul10( const char* in, const char** out=0)
-{
+inline
+unsigned int strtoul10( const char* in, const char** out=0) {
     unsigned int value = 0;
 
-    bool running = true;
-    while ( running )
-    {
+    for ( ;; ) {
         if ( *in < '0' || *in > '9' )
             break;
 
         value = ( value * 10 ) + ( *in - '0' );
         ++in;
     }
-    if (out)*out = in;
+    if ( out ) {
+        *out = in;
+    }
     return value;
 }
 
 // ------------------------------------------------------------------------------------
 // Convert a string in octal format to a number
 // ------------------------------------------------------------------------------------
-inline unsigned int strtoul8( const char* in, const char** out=0)
-{
-    unsigned int value = 0;
-
-    bool running = true;
-    while ( running )
-    {
-        if ( *in < '0' || *in > '7' )
+inline
+unsigned int strtoul8( const char* in, const char** out=0) {
+    unsigned int value( 0 );
+    for ( ;; ) {
+        if ( *in < '0' || *in > '7' ) {
             break;
+        }
 
         value = ( value << 3 ) + ( *in - '0' );
         ++in;
     }
-    if (out)*out = in;
+    if ( out ) {
+        *out = in;
+    }
     return value;
 }
 
 // ------------------------------------------------------------------------------------
 // Convert a string in hex format to a number
 // ------------------------------------------------------------------------------------
-inline unsigned int strtoul16( const char* in, const char** out=0)
-{
-    unsigned int value = 0;
-
-    bool running = true;
-    while ( running )
-    {
-        if ( *in >= '0' && *in <= '9' )
-        {
+inline
+unsigned int strtoul16( const char* in, const char** out=0) {
+    unsigned int value( 0 );
+    for ( ;; ) {
+        if ( *in >= '0' && *in <= '9' ) {
             value = ( value << 4u ) + ( *in - '0' );
-        }
-        else if (*in >= 'A' && *in <= 'F')
-        {
+        } else if (*in >= 'A' && *in <= 'F') {
             value = ( value << 4u ) + ( *in - 'A' ) + 10;
-        }
-        else if (*in >= 'a' && *in <= 'f')
-        {
+        } else if (*in >= 'a' && *in <= 'f') {
             value = ( value << 4u ) + ( *in - 'a' ) + 10;
         }
-        else break;
+        else {
+            break;
+        }
         ++in;
     }
-    if (out)*out = in;
+    if ( out ) {
+        *out = in;
+    }
     return value;
 }
 
@@ -129,17 +125,16 @@ inline unsigned int strtoul16( const char* in, const char** out=0)
 // Convert just one hex digit
 // Return value is UINT_MAX if the input character is not a hex digit.
 // ------------------------------------------------------------------------------------
-inline unsigned int HexDigitToDecimal(char in)
-{
-    unsigned int out = UINT_MAX;
-    if (in >= '0' && in <= '9')
+inline
+unsigned int HexDigitToDecimal(char in) {
+    unsigned int out( UINT_MAX );
+    if ( in >= '0' && in <= '9' ) {
         out = in - '0';
-
-    else if (in >= 'a' && in <= 'f')
+    } else if ( in >= 'a' && in <= 'f' ) {
         out = 10u + in - 'a';
-
-    else if (in >= 'A' && in <= 'F')
+    } else if ( in >= 'A' && in <= 'F' ) {
         out = 10u + in - 'A';
+    }
 
     // return value is UINT_MAX if the input is not a hex digit
     return out;
@@ -148,8 +143,8 @@ inline unsigned int HexDigitToDecimal(char in)
 // ------------------------------------------------------------------------------------
 // Convert a hex-encoded octet (2 characters, i.e. df or 1a).
 // ------------------------------------------------------------------------------------
-inline uint8_t HexOctetToDecimal(const char* in)
-{
+inline
+uint8_t HexOctetToDecimal(const char* in) {
     return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]);
 }
 
@@ -157,11 +152,12 @@ inline uint8_t HexOctetToDecimal(const char* in)
 // ------------------------------------------------------------------------------------
 // signed variant of strtoul10
 // ------------------------------------------------------------------------------------
-inline int strtol10( const char* in, const char** out=0)
-{
+inline
+int strtol10( const char* in, const char** out=0) {
     bool inv = (*in=='-');
-    if (inv || *in=='+')
+    if ( inv || *in == '+' ) {
         ++in;
+    }
 
     int value = strtoul10(in,out);
     if (inv) {
@@ -176,10 +172,9 @@ inline int strtol10( const char* in, const char** out=0)
 // 0NNN   - oct
 // NNN    - dec
 // ------------------------------------------------------------------------------------
-inline unsigned int strtoul_cppstyle( const char* in, const char** out=0)
-{
-    if ('0' == in[0])
-    {
+inline
+unsigned int strtoul_cppstyle( const char* in, const char** out=0) {
+    if ('0' == in[0]) {
         return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out);
     }
     return strtoul10(in, out);
@@ -189,19 +184,19 @@ inline unsigned int strtoul_cppstyle( const char* in, const char** out=0)
 // Special version of the function, providing higher accuracy and safety
 // It is mainly used by fast_atof to prevent ugly and unwanted integer overflows.
 // ------------------------------------------------------------------------------------
-inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0)
-{
+inline
+uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0) {
     unsigned int cur = 0;
     uint64_t value = 0;
 
-    if ( *in < '0' || *in > '9' )
-        throw std::invalid_argument(std::string("The string \"") + in + "\" cannot be converted into a value.");
+    if ( *in < '0' || *in > '9' ) {
+        throw std::invalid_argument( std::string( "The string \"" ) + in + "\" cannot be converted into a value." );
+    }
 
-    bool running = true;
-    while ( running )
-    {
-        if ( *in < '0' || *in > '9' )
+    for ( ;; ) {
+        if ( *in < '0' || *in > '9' ) {
             break;
+        }
 
         const uint64_t new_value = ( value * 10 ) + ( *in - '0' );
 
@@ -240,11 +235,12 @@ inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int*
 // ------------------------------------------------------------------------------------
 // signed variant of strtoul10_64
 // ------------------------------------------------------------------------------------
-inline int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* max_inout = 0)
-{
+inline
+int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* max_inout = 0) {
     bool inv = (*in == '-');
-    if (inv || *in == '+')
+    if (inv || *in == '+') {
         ++in;
+    }
 
     int64_t value = strtoul10_64(in, out, max_inout);
     if (inv) {
@@ -263,8 +259,8 @@ inline int64_t strtol10_64(const char* in, const char** out = 0, unsigned int* m
 // If you find any bugs, please send them to me, niko (at) irrlicht3d.org.
 // ------------------------------------------------------------------------------------
 template <typename Real>
-inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma = true)
-{
+inline
+const char* fast_atoreal_move(const char* c, Real& out, bool check_comma = true) {
     Real f = 0;
 
     bool inv = (*c == '-');
@@ -272,42 +268,36 @@ inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma
         ++c;
     }
 
-    if ((c[0] == 'N' || c[0] == 'n') && ASSIMP_strincmp(c, "nan", 3) == 0)
-    {
+    if ((c[0] == 'N' || c[0] == 'n') && ASSIMP_strincmp(c, "nan", 3) == 0) {
         out = std::numeric_limits<Real>::quiet_NaN();
         c += 3;
         return c;
     }
 
-    if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inf", 3) == 0)
-    {
+    if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inf", 3) == 0) {
         out = std::numeric_limits<Real>::infinity();
         if (inv) {
             out = -out;
         }
         c += 3;
-        if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inity", 5) == 0)
-        {
+        if ((c[0] == 'I' || c[0] == 'i') && ASSIMP_strincmp(c, "inity", 5) == 0) {
             c += 5;
         }
         return c;
     }
 
     if (!(c[0] >= '0' && c[0] <= '9') &&
-        !((c[0] == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9'))
-    {
+        !((c[0] == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9')) {
         throw std::invalid_argument("Cannot parse string "
                                     "as real number: does not start with digit "
                                     "or decimal point followed by digit.");
     }
 
-    if (*c != '.' && (! check_comma || c[0] != ','))
-    {
+    if (*c != '.' && (! check_comma || c[0] != ',')) {
         f = static_cast<Real>( strtoul10_64 ( c, &c) );
     }
 
-    if ((*c == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9')
-    {
+    if ((*c == '.' || (check_comma && c[0] == ',')) && c[1] >= '0' && c[1] <= '9') {
         ++c;
 
         // NOTE: The original implementation is highly inaccurate here. The precision of a single
@@ -358,30 +348,30 @@ inline const char* fast_atoreal_move(const char* c, Real& out, bool check_comma
 
 // ------------------------------------------------------------------------------------
 // The same but more human.
-inline ai_real fast_atof(const char* c)
-{
+inline
+ai_real fast_atof(const char* c) {
     ai_real ret(0.0);
     fast_atoreal_move<ai_real>(c, ret);
     return ret;
 }
 
 
-inline ai_real fast_atof( const char* c, const char** cout)
-{
+inline
+ai_real fast_atof( const char* c, const char** cout) {
     ai_real ret(0.0);
     *cout = fast_atoreal_move<ai_real>(c, ret);
 
     return ret;
 }
 
-inline ai_real fast_atof( const char** inout)
-{
+inline
+ai_real fast_atof( const char** inout) {
     ai_real ret(0.0);
     *inout = fast_atoreal_move<ai_real>(*inout, ret);
 
     return ret;
 }
 
-} // end of namespace Assimp
+} //! namespace Assimp
 
-#endif
+#endif // __FAST_A_TO_F_H_INCLUDED__

+ 34 - 13
include/assimp/mesh.h

@@ -200,8 +200,7 @@ struct aiFace
 // ---------------------------------------------------------------------------
 /** @brief A single influence of a bone on a vertex.
  */
-struct aiVertexWeight
-{
+struct aiVertexWeight {
     //! Index of the vertex which is influenced by the bone.
     unsigned int mVertexId;
 
@@ -214,15 +213,26 @@ struct aiVertexWeight
     //! Default constructor
     aiVertexWeight()
     : mVertexId(0)
-    , mWeight(0.0f)
-    { }
+    , mWeight(0.0f) {
+        // empty
+    }
 
     //! Initialisation from a given index and vertex weight factor
     //! \param pID ID
     //! \param pWeight Vertex weight factor
-    aiVertexWeight( unsigned int pID, float pWeight)
-        : mVertexId( pID), mWeight( pWeight)
-    { /* nothing to do here */ }
+    aiVertexWeight( unsigned int pID, float pWeight )
+    : mVertexId( pID )
+    , mWeight( pWeight ) {
+        // empty
+    }
+
+    bool operator == ( const aiVertexWeight &rhs ) const {
+        return ( mVertexId == rhs.mVertexId && mWeight == rhs.mWeight );
+    }
+
+    bool operator != ( const aiVertexWeight &rhs ) const {
+        return ( *this == rhs );
+    }
 
 #endif // __cplusplus
 };
@@ -235,8 +245,7 @@ struct aiVertexWeight
  *  which it can be addressed by animations. In addition it has a number of
  *  influences on vertices.
  */
-struct aiBone
-{
+struct aiBone {
     //! The name of the bone.
     C_STRUCT aiString mName;
 
@@ -254,10 +263,10 @@ struct aiBone
 
     //! Default constructor
     aiBone()
-        : mName()
-        , mNumWeights( 0 )
-      , mWeights( NULL )
-    {
+    : mName()
+    , mNumWeights( 0 )
+    , mWeights( nullptr ) {
+        // empty
     }
 
     //! Copy constructor
@@ -298,7 +307,19 @@ struct aiBone
         return *this;
     }
 
+    bool operator == ( const aiBone &rhs ) const {
+        if ( mName != rhs.mName || mNumWeights != rhs.mNumWeights ) {
+            return false;
+        }
 
+        for ( size_t i = 0; i < mNumWeights; ++i ) {
+            if ( mWeights[ i ] != rhs.mWeights[ i ] ) {
+                return false;
+            }
+        }
+
+        return true;
+    }
     //! Destructor - deletes the array of vertex weights
     ~aiBone()
     {

+ 76 - 0
include/assimp/pbrmaterial.h

@@ -0,0 +1,76 @@
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (assimp)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2018, assimp team
+
+
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
+conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+---------------------------------------------------------------------------
+*/
+
+/** @file pbrmaterial.h
+ *  @brief Defines the material system of the library
+ */
+#ifndef AI_PBRMATERIAL_H_INC
+#define AI_PBRMATERIAL_H_INC
+
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR "$mat.gltf.pbrMetallicRoughness.baseColorFactor", 0, 0
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR "$mat.gltf.pbrMetallicRoughness.metallicFactor", 0, 0
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR "$mat.gltf.pbrMetallicRoughness.roughnessFactor", 0, 0
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE aiTextureType_DIFFUSE, 1
+#define AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE aiTextureType_UNKNOWN, 0
+#define AI_MATKEY_GLTF_ALPHAMODE "$mat.gltf.alphaMode", 0, 0
+#define AI_MATKEY_GLTF_ALPHACUTOFF "$mat.gltf.alphaCutoff", 0, 0
+#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS "$mat.gltf.pbrSpecularGlossiness", 0, 0
+#define AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR "$mat.gltf.pbrMetallicRoughness.glossinessFactor", 0, 0
+
+#define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE "$tex.file.texCoord"
+#define _AI_MATKEY_GLTF_MAPPINGNAME_BASE "$tex.mappingname"
+#define _AI_MATKEY_GLTF_MAPPINGID_BASE "$tex.mappingid"
+#define _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE "$tex.mappingfiltermag"
+#define _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE "$tex.mappingfiltermin"
+#define _AI_MATKEY_GLTF_SCALE_BASE "$tex.scale"
+#define _AI_MATKEY_GLTF_STRENGTH_BASE "$tex.strength"
+
+#define AI_MATKEY_GLTF_TEXTURE_TEXCOORD _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGNAME(type, N) _AI_MATKEY_GLTF_MAPPINGNAME_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGID(type, N) _AI_MATKEY_GLTF_MAPPINGID_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGFILTER_MAG(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MAG_BASE, type, N
+#define AI_MATKEY_GLTF_MAPPINGFILTER_MIN(type, N) _AI_MATKEY_GLTF_MAPPINGFILTER_MIN_BASE, type, N
+#define AI_MATKEY_GLTF_TEXTURE_SCALE(type, N) _AI_MATKEY_GLTF_SCALE_BASE, type, N
+#define AI_MATKEY_GLTF_TEXTURE_STRENGTH(type, N) _AI_MATKEY_GLTF_STRENGTH_BASE, type, N
+
+#endif //!!AI_PBRMATERIAL_H_INC