Update specter

This commit is contained in:
Phillip Stephens 2016-04-25 00:58:12 -07:00
parent 8b0dac9a17
commit 7b2705db52
4 changed files with 36 additions and 21 deletions

View File

@ -4,7 +4,7 @@ set(COLLISION_SOURCES
CCollidableOBBTree.hpp CCollidableOBBTree.cpp CCollidableOBBTree.hpp CCollidableOBBTree.cpp
CCollidableOBBTreeGroup.hpp CCollidableOBBTreeGroup.cpp CCollidableOBBTreeGroup.hpp CCollidableOBBTreeGroup.cpp
CMaterialList.hpp CMaterialList.hpp
CMaterialFilter.hpp CMaterialFilter.hpp CMaterialFilter.cpp
CRayCastResult.hpp CRayCastResult.cpp) CRayCastResult.hpp CRayCastResult.cpp)
runtime_add_list(Collision COLLISION_SOURCES) runtime_add_list(Collision COLLISION_SOURCES)

View File

@ -0,0 +1,29 @@
#include "CMaterialFilter.hpp"
namespace urde
{
const CMaterialFilter CMaterialFilter::skPassEverything({0x00000000FFFFFFFF}, {0}, CMaterialFilter::EFilterType::Zero);
CMaterialFilter::CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, CMaterialFilter::EFilterType type)
: x0_include(include),
x8_exclude(exclude),
x10_type(type)
{
}
CMaterialFilter CMaterialFilter::MakeInclude(const CMaterialList& include)
{
return CMaterialFilter(include, {EMaterialTypes::Zero}, EFilterType::Zero);
}
CMaterialFilter CMaterialFilter::MakeExclude(const CMaterialList& exclude)
{
return CMaterialFilter({u64(0x00000000FFFFFFFF)}, exclude, EFilterType::Two);
}
CMaterialFilter CMaterialFilter::MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude)
{
return CMaterialFilter(include, exclude, EFilterType::Three);
}
}

View File

@ -16,33 +16,19 @@ public:
Three Three
}; };
private: private:
CMaterialList x0_include; CMaterialList x0_include;
CMaterialList x8_exclude; CMaterialList x8_exclude;
EFilterType x10_type = EFilterType::Three; EFilterType x10_type = EFilterType::Three;
public: public:
static const CMaterialFilter skPassEverything;
CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type) CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type);
: x0_include(include),
x8_exclude(exclude),
x10_type(type)
{
}
static CMaterialFilter MakeInclude(const CMaterialList& include) static CMaterialFilter MakeInclude(const CMaterialList& include);
{
return CMaterialFilter(include, {EMaterialTypes::Zero}, EFilterType::Zero);
}
static CMaterialFilter MakeExclude(const CMaterialList& exclude) static CMaterialFilter MakeExclude(const CMaterialList& exclude);
{
return CMaterialFilter({u64(0x00000000FFFFFFFF)}, exclude, EFilterType::Two);
}
static CMaterialFilter MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude) static CMaterialFilter MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude);
{
return CMaterialFilter(include, exclude, EFilterType::Three);
}
const CMaterialList& GetIncludeList() const { return x0_include; } const CMaterialList& GetIncludeList() const { return x0_include; }
const CMaterialList& GetExcludeList() const { return x8_exclude; } const CMaterialList& GetExcludeList() const { return x8_exclude; }

@ -1 +1 @@
Subproject commit 633c50fe33deb153a3e28d0e66ede01832741f62 Subproject commit d705b8d7f4f433b0bcbc76a789b3ed7874829e56