prime/include/Collision/CMaterialFilter.hpp

44 lines
1.2 KiB
C++
Raw Normal View History

#ifndef _CMATERIALFILTER
#define _CMATERIALFILTER
2022-08-13 01:26:00 +00:00
#include "types.h"
#include "Collision/CMaterialList.hpp"
class CMaterialFilter {
static const CMaterialFilter skPassEverything;
2022-08-13 01:26:00 +00:00
public:
enum EFilterType {
kFT_Always,
kFT_Include,
kFT_Exclude,
kFT_IncludeExclude,
};
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);
}
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)
#endif // _CMATERIALFILTER