diff --git a/code/Assimp.cpp b/code/Assimp.cpp index a1e30b8de..f8df73415 100644 --- a/code/Assimp.cpp +++ b/code/Assimp.cpp @@ -490,7 +490,7 @@ ASSIMP_API void aiSetImportPropertyInteger(aiPropertyStore* p, const char* szNam { ASSIMP_BEGIN_EXCEPTION_REGION(); PropertyMap* pp = reinterpret_cast(p); - SetGenericProperty(pp->ints,szName,value,NULL); + SetGenericProperty(pp->ints,szName,value); ASSIMP_END_EXCEPTION_REGION(void); } @@ -500,7 +500,7 @@ ASSIMP_API void aiSetImportPropertyFloat(aiPropertyStore* p, const char* szName, { ASSIMP_BEGIN_EXCEPTION_REGION(); PropertyMap* pp = reinterpret_cast(p); - SetGenericProperty(pp->floats,szName,value,NULL); + SetGenericProperty(pp->floats,szName,value); ASSIMP_END_EXCEPTION_REGION(void); } @@ -514,7 +514,7 @@ ASSIMP_API void aiSetImportPropertyString(aiPropertyStore* p, const char* szName } ASSIMP_BEGIN_EXCEPTION_REGION(); PropertyMap* pp = reinterpret_cast(p); - SetGenericProperty(pp->strings,szName,std::string(st->C_Str()),NULL); + SetGenericProperty(pp->strings,szName,std::string(st->C_Str())); ASSIMP_END_EXCEPTION_REGION(void); } @@ -528,7 +528,7 @@ ASSIMP_API void aiSetImportPropertyMatrix(aiPropertyStore* p, const char* szName } ASSIMP_BEGIN_EXCEPTION_REGION(); PropertyMap* pp = reinterpret_cast(p); - SetGenericProperty(pp->matrices,szName,*mat,NULL); + SetGenericProperty(pp->matrices,szName,*mat); ASSIMP_END_EXCEPTION_REGION(void); } diff --git a/code/ColladaHelper.h b/code/ColladaHelper.h index 2c94cd100..71ccd2dfc 100644 --- a/code/ColladaHelper.h +++ b/code/ColladaHelper.h @@ -513,6 +513,8 @@ struct Effect // Scalar factory float mShininess, mRefractIndex, mReflectivity; float mTransparency; + bool mHasTransparency; + bool mRGBTransparency; // local params referring to each other by their SID typedef std::map ParamLibrary; @@ -533,7 +535,9 @@ struct Effect , mShininess (10.0f) , mRefractIndex (1.f) , mReflectivity (1.f) - , mTransparency (0.f) + , mTransparency (1.f) + , mHasTransparency (false) + , mRGBTransparency(false) , mDoubleSided (false) , mWireframe (false) , mFaceted (false) diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 2f59e161a..735eede18 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -117,6 +117,7 @@ void ColladaLoader::SetupProperties(const Importer* pImp) { noSkeletonMesh = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0; ignoreUpDirection = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION,0) != 0; + invertTransparency = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_COLLADA_INVERT_TRANSPARENCY,0) != 0; } @@ -1338,11 +1339,25 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce mat.AddProperty( &effect.mRefractIndex, 1, AI_MATKEY_REFRACTI); // transparency, a very hard one. seemingly not all files are following the - // specification here .. but we can trick. - if (effect.mTransparency >= 0.f && effect.mTransparency < 1.f) { - effect.mTransparency = 1.f- effect.mTransparency; - mat.AddProperty( &effect.mTransparency, 1, AI_MATKEY_OPACITY ); - mat.AddProperty( &effect.mTransparent, 1, AI_MATKEY_COLOR_TRANSPARENT ); + // specification here (1.0 transparency => completly opaque)... + // therefore, we let the opportunity for the user to manually invert + // the transparency if necessary and we add preliminary support for RGB_ZERO mode + if(effect.mTransparency >= 0.f && effect.mTransparency <= 1.f) { + // Trying some support for RGB_ZERO mode + if(effect.mRGBTransparency) { + effect.mTransparency = 1.f - effect.mTransparent.a; + } + + // Global option + if(invertTransparency) { + effect.mTransparency = 1.f - effect.mTransparency; + } + + // Is the material finally transparent ? + if (effect.mHasTransparency || effect.mTransparency < 1.f) { + mat.AddProperty( &effect.mTransparency, 1, AI_MATKEY_OPACITY ); + mat.AddProperty( &effect.mTransparent, 1, AI_MATKEY_COLOR_TRANSPARENT ); + } } // add textures, if given diff --git a/code/ColladaLoader.h b/code/ColladaLoader.h index e268bf086..4ff0a667d 100644 --- a/code/ColladaLoader.h +++ b/code/ColladaLoader.h @@ -241,6 +241,7 @@ protected: bool noSkeletonMesh; bool ignoreUpDirection; + bool invertTransparency; /** Used by FindNameForNode() to generate unique node names */ unsigned int mNodeNameCounter; diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 4e12a03dc..05a756ed4 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER +#include #include "ColladaParser.h" #include "fast_atof.h" #include "ParsingUtils.h" @@ -1230,6 +1231,14 @@ void ColladaParser::ReadEffectProfileCommon( Collada::Effect& pEffect) ReadEffectColor( pEffect.mReflective, pEffect.mTexReflective); } else if( IsElement( "transparent")) { + pEffect.mHasTransparency = true; + + // In RGB_ZERO mode, the transparency is interpreted in reverse, go figure... + if(::strcmp(mReader->getAttributeValueSafe("opaque"), "RGB_ZERO") == 0) { + // TODO: handle RGB_ZERO mode completely + pEffect.mRGBTransparency = true; + } + ReadEffectColor( pEffect.mTransparent,pEffect.mTexTransparent); } else if( IsElement( "shininess")) @@ -1987,12 +1996,12 @@ void ColladaParser::ReadIndexData( Mesh* pMesh) break; } } - + #ifdef ASSIMP_BUILD_DEBUG if (primType != Prim_TriFans && primType != Prim_TriStrips) { ai_assert(actualPrimitives == numPrimitives); } -#endif +#endif // only when we're done reading all

tags (and thus know the final vertex count) can we commit the submesh subgroup.mNumFaces = actualPrimitives; diff --git a/code/Exporter.cpp b/code/Exporter.cpp index f8744503d..0aea1b044 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -513,34 +513,30 @@ ExportProperties::ExportProperties(const ExportProperties &other) // ------------------------------------------------------------------------------------------------ // Set a configuration property -void ExportProperties :: SetPropertyInteger(const char* szName, int iValue, - bool* bWasExisting /*= NULL*/) +bool ExportProperties :: SetPropertyInteger(const char* szName, int iValue) { - SetGenericProperty(mIntProperties, szName,iValue,bWasExisting); + return SetGenericProperty(mIntProperties, szName,iValue); } // ------------------------------------------------------------------------------------------------ // Set a configuration property -void ExportProperties :: SetPropertyFloat(const char* szName, float iValue, - bool* bWasExisting /*= NULL*/) +bool ExportProperties :: SetPropertyFloat(const char* szName, float iValue) { - SetGenericProperty(mFloatProperties, szName,iValue,bWasExisting); + return SetGenericProperty(mFloatProperties, szName,iValue); } // ------------------------------------------------------------------------------------------------ // Set a configuration property -void ExportProperties :: SetPropertyString(const char* szName, const std::string& value, - bool* bWasExisting /*= NULL*/) +bool ExportProperties :: SetPropertyString(const char* szName, const std::string& value) { - SetGenericProperty(mStringProperties, szName,value,bWasExisting); + return SetGenericProperty(mStringProperties, szName,value); } // ------------------------------------------------------------------------------------------------ // Set a configuration property -void ExportProperties :: SetPropertyMatrix(const char* szName, const aiMatrix4x4& value, - bool* bWasExisting /*= NULL*/) +bool ExportProperties :: SetPropertyMatrix(const char* szName, const aiMatrix4x4& value) { - SetGenericProperty(mMatrixProperties, szName,value,bWasExisting); + return SetGenericProperty(mMatrixProperties, szName,value); } // ------------------------------------------------------------------------------------------------ diff --git a/code/GenericProperty.h b/code/GenericProperty.h index 26897e47e..b587270a3 100644 --- a/code/GenericProperty.h +++ b/code/GenericProperty.h @@ -49,22 +49,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ------------------------------------------------------------------------------------------------ template -inline void SetGenericProperty(std::map< unsigned int, T >& list, - const char* szName, const T& value, bool* bWasExisting = NULL) +inline bool SetGenericProperty(std::map< unsigned int, T >& list, + const char* szName, const T& value) { ai_assert(NULL != szName); const uint32_t hash = SuperFastHash(szName); typename std::map::iterator it = list.find(hash); if (it == list.end()) { - if (bWasExisting) - *bWasExisting = false; list.insert(std::pair( hash, value )); - return; + return false; } (*it).second = value; - if (bWasExisting) - *bWasExisting = true; + return true; } // ------------------------------------------------------------------------------------------------ diff --git a/code/Importer.cpp b/code/Importer.cpp index 9c9bdbf8d..ead61402c 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -925,42 +925,46 @@ void Importer::GetExtensionList(aiString& szOut) const // ------------------------------------------------------------------------------------------------ // Set a configuration property -void Importer::SetPropertyInteger(const char* szName, int iValue, - bool* bWasExisting /*= NULL*/) +bool Importer::SetPropertyInteger(const char* szName, int iValue) { + bool existing; ASSIMP_BEGIN_EXCEPTION_REGION(); - SetGenericProperty(pimpl->mIntProperties, szName,iValue,bWasExisting); - ASSIMP_END_EXCEPTION_REGION(void); + existing = SetGenericProperty(pimpl->mIntProperties, szName,iValue); + ASSIMP_END_EXCEPTION_REGION(bool); + return existing; } // ------------------------------------------------------------------------------------------------ // Set a configuration property -void Importer::SetPropertyFloat(const char* szName, float iValue, - bool* bWasExisting /*= NULL*/) +bool Importer::SetPropertyFloat(const char* szName, float iValue) { + bool exising; ASSIMP_BEGIN_EXCEPTION_REGION(); - SetGenericProperty(pimpl->mFloatProperties, szName,iValue,bWasExisting); - ASSIMP_END_EXCEPTION_REGION(void); + exising = SetGenericProperty(pimpl->mFloatProperties, szName,iValue); + ASSIMP_END_EXCEPTION_REGION(bool); + return exising; } // ------------------------------------------------------------------------------------------------ // Set a configuration property -void Importer::SetPropertyString(const char* szName, const std::string& value, - bool* bWasExisting /*= NULL*/) +bool Importer::SetPropertyString(const char* szName, const std::string& value) { + bool exising; ASSIMP_BEGIN_EXCEPTION_REGION(); - SetGenericProperty(pimpl->mStringProperties, szName,value,bWasExisting); - ASSIMP_END_EXCEPTION_REGION(void); + exising = SetGenericProperty(pimpl->mStringProperties, szName,value); + ASSIMP_END_EXCEPTION_REGION(bool); + return exising; } // ------------------------------------------------------------------------------------------------ // Set a configuration property -void Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value, - bool* bWasExisting /*= NULL*/) +bool Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value) { + bool exising; ASSIMP_BEGIN_EXCEPTION_REGION(); - SetGenericProperty(pimpl->mMatrixProperties, szName,value,bWasExisting); - ASSIMP_END_EXCEPTION_REGION(void); + exising = SetGenericProperty(pimpl->mMatrixProperties, szName,value); + ASSIMP_END_EXCEPTION_REGION(bool); + return exising; } // ------------------------------------------------------------------------------------------------ diff --git a/code/MD3Loader.cpp b/code/MD3Loader.cpp index 36cb573ac..a78a5e3f2 100644 --- a/code/MD3Loader.cpp +++ b/code/MD3Loader.cpp @@ -563,7 +563,7 @@ bool MD3Importer::ReadMultipartFile() // ensure we won't try to load ourselves recursively BatchLoader::PropertyMap props; - SetGenericProperty( props.ints, AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART, 0, NULL); + SetGenericProperty( props.ints, AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART, 0); // now read these three files BatchLoader batch(mIOHandler); diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index eaca35cd6..b46354214 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -920,7 +920,7 @@ void SceneCombiner::MergeMaterials(aiMaterial** dest, // Test if we already have a matching property const aiMaterialProperty* prop_exist; - if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mType, sprop->mIndex, &prop_exist) != AI_SUCCESS) { + if(aiGetMaterialProperty(out, sprop->mKey.C_Str(), sprop->mSemantic, sprop->mIndex, &prop_exist) != AI_SUCCESS) { // If not, we add it to the new material aiMaterialProperty* prop = out->mProperties[out->mNumProperties] = new aiMaterialProperty(); diff --git a/code/fast_atof.h b/code/fast_atof.h index 54e98eb3a..8b5af3f1a 100644 --- a/code/fast_atof.h +++ b/code/fast_atof.h @@ -255,7 +255,7 @@ 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 -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; @@ -286,14 +286,14 @@ inline const char* fast_atoreal_move( const char* c, Real& out, bool check_comma } if (!(c[0] >= '0' && c[0] <= '9') && - !(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 != '.') + if (*c != '.' && (! check_comma || c[0] != ',')) { f = static_cast( strtoul10_64 ( c, &c) ); } diff --git a/include/assimp/Exporter.hpp b/include/assimp/Exporter.hpp index 692830f02..fb890129e 100644 --- a/include/assimp/Exporter.hpp +++ b/include/assimp/Exporter.hpp @@ -348,16 +348,14 @@ public: * are defined in the aiConfig.g header (all constants share the * prefix AI_CONFIG_XXX and are simple strings). * @param iValue New value of the property - * @param bWasExisting Optional pointer to receive true if the - * property was set before. The new value replaces the previous value - * in this case. + * @return true if the property was set before. The new value replaces + * the previous value in this case. * @note Property of different types (float, int, string ..) are kept * on different stacks, so calling SetPropertyInteger() for a * floating-point property has no effect - the loader will call * GetPropertyFloat() to read the property, but it won't be there. */ - void SetPropertyInteger(const char* szName, int iValue, - bool* bWasExisting = NULL); + bool SetPropertyInteger(const char* szName, int iValue); // ------------------------------------------------------------------- /** Set a boolean configuration property. Boolean properties @@ -366,30 +364,27 @@ public: * #GetPropertyBool and vice versa. * @see SetPropertyInteger() */ - void SetPropertyBool(const char* szName, bool value, bool* bWasExisting = NULL) { - SetPropertyInteger(szName,value,bWasExisting); + bool SetPropertyBool(const char* szName, bool value) { + return SetPropertyInteger(szName,value); } // ------------------------------------------------------------------- /** Set a floating-point configuration property. * @see SetPropertyInteger() */ - void SetPropertyFloat(const char* szName, float fValue, - bool* bWasExisting = NULL); + bool SetPropertyFloat(const char* szName, float fValue); // ------------------------------------------------------------------- /** Set a string configuration property. * @see SetPropertyInteger() */ - void SetPropertyString(const char* szName, const std::string& sValue, - bool* bWasExisting = NULL); + bool SetPropertyString(const char* szName, const std::string& sValue); // ------------------------------------------------------------------- /** Set a matrix configuration property. * @see SetPropertyInteger() */ - void SetPropertyMatrix(const char* szName, const aiMatrix4x4& sValue, - bool* bWasExisting = NULL); + bool SetPropertyMatrix(const char* szName, const aiMatrix4x4& sValue); // ------------------------------------------------------------------- /** Get a configuration property. diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 8aa9e5ae5..8d9141aeb 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -194,16 +194,14 @@ public: * are defined in the aiConfig.g header (all constants share the * prefix AI_CONFIG_XXX and are simple strings). * @param iValue New value of the property - * @param bWasExisting Optional pointer to receive true if the - * property was set before. The new value replaces the previous value - * in this case. + * @return true if the property was set before. The new value replaces + * the previous value in this case. * @note Property of different types (float, int, string ..) are kept * on different stacks, so calling SetPropertyInteger() for a * floating-point property has no effect - the loader will call * GetPropertyFloat() to read the property, but it won't be there. */ - void SetPropertyInteger(const char* szName, int iValue, - bool* bWasExisting = NULL); + bool SetPropertyInteger(const char* szName, int iValue); // ------------------------------------------------------------------- /** Set a boolean configuration property. Boolean properties @@ -212,30 +210,27 @@ public: * #GetPropertyBool and vice versa. * @see SetPropertyInteger() */ - void SetPropertyBool(const char* szName, bool value, bool* bWasExisting = NULL) { - SetPropertyInteger(szName,value,bWasExisting); + bool SetPropertyBool(const char* szName, bool value) { + return SetPropertyInteger(szName,value); } // ------------------------------------------------------------------- /** Set a floating-point configuration property. * @see SetPropertyInteger() */ - void SetPropertyFloat(const char* szName, float fValue, - bool* bWasExisting = NULL); + bool SetPropertyFloat(const char* szName, float fValue); // ------------------------------------------------------------------- /** Set a string configuration property. * @see SetPropertyInteger() */ - void SetPropertyString(const char* szName, const std::string& sValue, - bool* bWasExisting = NULL); + bool SetPropertyString(const char* szName, const std::string& sValue); // ------------------------------------------------------------------- /** Set a matrix configuration property. * @see SetPropertyInteger() */ - void SetPropertyMatrix(const char* szName, const aiMatrix4x4& sValue, - bool* bWasExisting = NULL); + bool SetPropertyMatrix(const char* szName, const aiMatrix4x4& sValue); // ------------------------------------------------------------------- /** Get a configuration property. diff --git a/include/assimp/config.h b/include/assimp/config.h index 6b598f2a9..29cfbc5d1 100644 --- a/include/assimp/config.h +++ b/include/assimp/config.h @@ -877,8 +877,24 @@ enum aiComponent */ #define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION" +// --------------------------------------------------------------------------- +/** @brief Specifies whether the Collada loader will ignore the provided up direction. + * + * If this property is set to true, the up direction provided in the file header will + * be ignored and the file will be loaded as is. + * Property type: Bool. Default value: false. + */ #define AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION "IMPORT_COLLADA_IGNORE_UP_DIRECTION" - + +// --------------------------------------------------------------------------- +/** @brief Specifies whether the Collada loader will invert the transparency value. + * + * If this property is set to true, the transparency value will be interpreted as the + * inverse of the usual transparency. This is useful because lots of exporters does + * not respect the standard and do the opposite of what is normally expected. + * Property type: Bool. Default value: false. + */ +#define AI_CONFIG_IMPORT_COLLADA_INVERT_TRANSPARENCY "IMPORT_COLLADA_INVERT_TRANSPARENCY" // ---------- All the Export defines ------------ @@ -887,7 +903,6 @@ enum aiComponent * Property type: Bool. Default value: false. */ -#define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT" - +#define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT" #endif // !! AI_CONFIG_H_INC diff --git a/test/unit/utImporter.cpp b/test/unit/utImporter.cpp index 44a7e1b0b..c7094229a 100644 --- a/test/unit/utImporter.cpp +++ b/test/unit/utImporter.cpp @@ -131,21 +131,19 @@ TEST_F(ImporterTest, testMemoryRead) // ------------------------------------------------------------------------------------------------ TEST_F(ImporterTest, testIntProperty) { - bool b; - pImp->SetPropertyInteger("quakquak",1503,&b); + bool b = pImp->SetPropertyInteger("quakquak",1503); EXPECT_FALSE(b); EXPECT_EQ(1503, pImp->GetPropertyInteger("quakquak",0)); EXPECT_EQ(314159, pImp->GetPropertyInteger("not_there",314159)); - pImp->SetPropertyInteger("quakquak",1504,&b); + b = pImp->SetPropertyInteger("quakquak",1504); EXPECT_TRUE(b); } // ------------------------------------------------------------------------------------------------ TEST_F(ImporterTest, testFloatProperty) { - bool b; - pImp->SetPropertyFloat("quakquak",1503.f,&b); + bool b = pImp->SetPropertyFloat("quakquak",1503.f); EXPECT_TRUE(!b); EXPECT_EQ(1503.f, pImp->GetPropertyFloat("quakquak",0.f)); EXPECT_EQ(314159.f, pImp->GetPropertyFloat("not_there",314159.f)); @@ -154,8 +152,7 @@ TEST_F(ImporterTest, testFloatProperty) // ------------------------------------------------------------------------------------------------ TEST_F(ImporterTest, testStringProperty) { - bool b; - pImp->SetPropertyString("quakquak","test",&b); + bool b = pImp->SetPropertyString("quakquak","test"); EXPECT_TRUE(!b); EXPECT_EQ("test", pImp->GetPropertyString("quakquak","weghwekg")); EXPECT_EQ("ILoveYou", pImp->GetPropertyString("not_there","ILoveYou")); diff --git a/tools/assimp_view/Display.cpp b/tools/assimp_view/Display.cpp index 37c22962b..c0d6c4f9e 100644 --- a/tools/assimp_view/Display.cpp +++ b/tools/assimp_view/Display.cpp @@ -693,7 +693,7 @@ int CDisplay::FillDisplayList(void) // fill in the first entry TVITEMEX tvi; TVINSERTSTRUCT sNew; - tvi.pszText = "Model"; + tvi.pszText = (char*) "Model"; tvi.cchTextMax = (int)strlen(tvi.pszText); tvi.mask = TVIF_TEXT | TVIF_SELECTEDIMAGE | TVIF_IMAGE | TVIF_HANDLE | TVIF_STATE; tvi.state = TVIS_EXPANDED; diff --git a/tools/assimp_view/assimp_view.h b/tools/assimp_view/assimp_view.h index 7ae21aed4..d18148dc5 100644 --- a/tools/assimp_view/assimp_view.h +++ b/tools/assimp_view/assimp_view.h @@ -72,12 +72,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../../code/StringComparison.h" // ASSIMP_stricmp and ASSIMP_strincmp // in order for std::min and std::max to behave properly -/*#ifdef min -#undef min +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif // max +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) #endif // min -#ifdef max -#undef max -#endif // min*/ #include