From 7b2705db52169dfeefd7f1dd572848c1e7ff3e85 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 25 Apr 2016 00:58:12 -0700 Subject: [PATCH] Update specter --- Runtime/Collision/CMakeLists.txt | 2 +- Runtime/Collision/CMaterialFilter.cpp | 29 +++++++++++++++++++++++++++ Runtime/Collision/CMaterialFilter.hpp | 24 +++++----------------- specter | 2 +- 4 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 Runtime/Collision/CMaterialFilter.cpp diff --git a/Runtime/Collision/CMakeLists.txt b/Runtime/Collision/CMakeLists.txt index bbf028ad8..0c609d94d 100644 --- a/Runtime/Collision/CMakeLists.txt +++ b/Runtime/Collision/CMakeLists.txt @@ -4,7 +4,7 @@ set(COLLISION_SOURCES CCollidableOBBTree.hpp CCollidableOBBTree.cpp CCollidableOBBTreeGroup.hpp CCollidableOBBTreeGroup.cpp CMaterialList.hpp - CMaterialFilter.hpp + CMaterialFilter.hpp CMaterialFilter.cpp CRayCastResult.hpp CRayCastResult.cpp) runtime_add_list(Collision COLLISION_SOURCES) diff --git a/Runtime/Collision/CMaterialFilter.cpp b/Runtime/Collision/CMaterialFilter.cpp new file mode 100644 index 000000000..570843b65 --- /dev/null +++ b/Runtime/Collision/CMaterialFilter.cpp @@ -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); +} + +} diff --git a/Runtime/Collision/CMaterialFilter.hpp b/Runtime/Collision/CMaterialFilter.hpp index afb41d76d..70394d06e 100644 --- a/Runtime/Collision/CMaterialFilter.hpp +++ b/Runtime/Collision/CMaterialFilter.hpp @@ -16,33 +16,19 @@ public: Three }; private: - CMaterialList x0_include; CMaterialList x8_exclude; EFilterType x10_type = EFilterType::Three; public: + static const CMaterialFilter skPassEverything; - CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type) - : x0_include(include), - x8_exclude(exclude), - x10_type(type) - { - } + CMaterialFilter(const CMaterialList& include, const CMaterialList& exclude, EFilterType type); - static CMaterialFilter MakeInclude(const CMaterialList& include) - { - return CMaterialFilter(include, {EMaterialTypes::Zero}, EFilterType::Zero); - } + static CMaterialFilter MakeInclude(const CMaterialList& include); - static CMaterialFilter MakeExclude(const CMaterialList& exclude) - { - return CMaterialFilter({u64(0x00000000FFFFFFFF)}, exclude, EFilterType::Two); - } + static CMaterialFilter MakeExclude(const CMaterialList& exclude); - static CMaterialFilter MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude) - { - return CMaterialFilter(include, exclude, EFilterType::Three); - } + static CMaterialFilter MakeIncludeExclude(const CMaterialList& include, const CMaterialList& exclude); const CMaterialList& GetIncludeList() const { return x0_include; } const CMaterialList& GetExcludeList() const { return x8_exclude; } diff --git a/specter b/specter index 633c50fe3..d705b8d7f 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit 633c50fe33deb153a3e28d0e66ede01832741f62 +Subproject commit d705b8d7f4f433b0bcbc76a789b3ed7874829e56