------------------------------------------------------------------------------------------------ Validate post-processing flags
| 444 | // ------------------------------------------------------------------------------------------------ |
| 445 | // Validate post-processing flags |
| 446 | bool Importer::ValidateFlags(unsigned int pFlags) const { |
| 447 | ASSIMP_BEGIN_EXCEPTION_REGION(); |
| 448 | // run basic checks for mutually exclusive flags |
| 449 | if(!_ValidateFlags(pFlags)) { |
| 450 | return false; |
| 451 | } |
| 452 | |
| 453 | // ValidateDS does not anymore occur in the pp list, it plays an awesome extra role ... |
| 454 | #ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS |
| 455 | if (pFlags & aiProcess_ValidateDataStructure) { |
| 456 | return false; |
| 457 | } |
| 458 | #endif |
| 459 | pFlags &= ~aiProcess_ValidateDataStructure; |
| 460 | |
| 461 | // Now iterate through all bits which are set in the flags and check whether we find at least |
| 462 | // one pp plugin which handles it. |
| 463 | for (unsigned int mask = 1; mask < (1u << (sizeof(unsigned int)*8-1));mask <<= 1) { |
| 464 | |
| 465 | if (pFlags & mask) { |
| 466 | |
| 467 | bool have = false; |
| 468 | for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) { |
| 469 | if (pimpl->mPostProcessingSteps[a]-> IsActive(mask) ) { |
| 470 | |
| 471 | have = true; |
| 472 | break; |
| 473 | } |
| 474 | } |
| 475 | if (!have) { |
| 476 | return false; |
| 477 | } |
| 478 | } |
| 479 | } |
| 480 | ASSIMP_END_EXCEPTION_REGION(bool); |
| 481 | return true; |
| 482 | } |
| 483 | |
| 484 | // ------------------------------------------------------------------------------------------------ |
| 485 | const aiScene* Importer::ReadFileFromMemory(const void* pBuffer, size_t pLength, unsigned int pFlags, const char* pHint ) { |
no test coverage detected