Browse Source

Convert float to ai_real, (#5902)

Co-authored-by: ali turan <[email protected]>
Co-authored-by: Kim Kulling <[email protected]>
hankarun 9 months ago
parent
commit
72c51a9997
2 changed files with 4 additions and 4 deletions
  1. 2 2
      include/assimp/material.h
  2. 2 2
      include/assimp/material.inl

+ 2 - 2
include/assimp/material.h

@@ -1535,7 +1535,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
         const char *pKey,
         unsigned int type,
         unsigned int index,
-        float *pOut,
+        ai_real *pOut,
         unsigned int *pMax);
 
 // ---------------------------------------------------------------------------
@@ -1561,7 +1561,7 @@ static inline aiReturn aiGetMaterialFloat(const C_STRUCT aiMaterial *pMat,
         const char *pKey,
         unsigned int type,
         unsigned int index,
-        float *pOut) {
+        ai_real *pOut) {
     return aiGetMaterialFloatArray(pMat, pKey, type, index, pOut, NULL);
 }
 

+ 2 - 2
include/assimp/material.inl

@@ -67,7 +67,7 @@ AI_FORCE_INLINE aiReturn aiMaterial::GetTexture( aiTextureType type,
        C_STRUCT aiString* path,
        aiTextureMapping* mapping    /*= NULL*/,
        unsigned int* uvindex        /*= NULL*/,
-       float* blend               /*= NULL*/,
+       ai_real* blend               /*= NULL*/,
        aiTextureOp* op              /*= NULL*/,
        aiTextureMapMode* mapmode    /*= NULL*/) const {
     return ::aiGetMaterialTexture(this,type,index,path,mapping,uvindex,blend,op,mapmode);
@@ -191,7 +191,7 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 }
 // ---------------------------------------------------------------------------
 AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
-        unsigned int idx, float& pOut) const {
+        unsigned int idx, ai_real& pOut) const {
     return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
 }
 // ---------------------------------------------------------------------------