------------------------------------------------------------------------------------------------ Get a color (3 or 4 floats) from the material
| 276 | // ------------------------------------------------------------------------------------------------ |
| 277 | // Get a color (3 or 4 floats) from the material |
| 278 | aiReturn aiGetMaterialColor(const aiMaterial *pMat, |
| 279 | const char *pKey, |
| 280 | unsigned int type, |
| 281 | unsigned int index, |
| 282 | aiColor4D *pOut) { |
| 283 | unsigned int iMax = 4; |
| 284 | const aiReturn eRet = aiGetMaterialFloatFloatArray(pMat, pKey, type, index, (float *)pOut, &iMax); |
| 285 | |
| 286 | // if no alpha channel is defined: set it to 1.0 |
| 287 | if (3 == iMax) { |
| 288 | pOut->a = 1.0; |
| 289 | } |
| 290 | |
| 291 | return eRet; |
| 292 | } |
| 293 | |
| 294 | // ------------------------------------------------------------------------------------------------ |
| 295 | // Get a aiUVTransform (5 floats) from the material |
no test coverage detected