2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CMATERIALFILTER
|
|
|
|
#define _CMATERIALFILTER
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "Collision/CMaterialList.hpp"
|
|
|
|
|
|
|
|
class CMaterialFilter {
|
2022-10-06 17:00:17 +00:00
|
|
|
static const CMaterialFilter skPassEverything;
|
2022-10-09 05:13:17 +00:00
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
public:
|
|
|
|
enum EFilterType {
|
|
|
|
kFT_Always,
|
|
|
|
kFT_Include,
|
|
|
|
kFT_Exclude,
|
|
|
|
kFT_IncludeExclude,
|
|
|
|
};
|
|
|
|
|
2022-10-06 17:00:17 +00:00
|
|
|
CMaterialFilter() : include(0x00000000FFFFFFFF), exclude(0), type(kFT_Always) {}
|
2022-08-13 01:26:00 +00:00
|
|
|
CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type)
|
|
|
|
: include(include), exclude(exclude), type(type) {}
|
|
|
|
|
2022-10-04 00:00:46 +00:00
|
|
|
static CMaterialFilter MakeInclude(const CMaterialList& include) {
|
|
|
|
return CMaterialFilter(include, CMaterialList(), kFT_Include);
|
|
|
|
}
|
|
|
|
static CMaterialFilter MakeExclude(const CMaterialList& exclude) {
|
|
|
|
return CMaterialFilter(CMaterialList(), exclude, kFT_Exclude);
|
|
|
|
}
|
2022-09-18 06:05:46 +00:00
|
|
|
static CMaterialFilter MakeIncludeExclude(const CMaterialList& include,
|
|
|
|
const CMaterialList& exclude) {
|
2022-08-13 01:26:00 +00:00
|
|
|
return CMaterialFilter(include, exclude, kFT_IncludeExclude);
|
|
|
|
}
|
|
|
|
|
2022-10-06 17:00:17 +00:00
|
|
|
bool Passes(const CMaterialList& other) const;
|
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
private:
|
|
|
|
CMaterialList include;
|
|
|
|
CMaterialList exclude;
|
|
|
|
EFilterType type;
|
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CMaterialFilter, 0x18)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CMATERIALFILTER
|