mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-08-03 12:15:35 +00:00
19 lines
485 B
C++
19 lines
485 B
C++
#include "Collision/CMaterialFilter.hpp"
|
|
|
|
const CMaterialFilter CMaterialFilter::skPassEverything;
|
|
|
|
bool CMaterialFilter::Passes(const CMaterialList& other) const {
|
|
switch (type) {
|
|
case kFT_Always:
|
|
return true;
|
|
case kFT_Include:
|
|
return other.SharesMaterials(include);
|
|
case kFT_Exclude:
|
|
return !other.SharesMaterials(exclude);
|
|
case kFT_IncludeExclude:
|
|
return other.SharesMaterials(include) && !other.SharesMaterials(exclude);
|
|
default:
|
|
return true;
|
|
}
|
|
}
|