refactoring btw
This commit is contained in:
+3
-8
@@ -4,6 +4,8 @@
|
||||
// #include "../typedefs.h"
|
||||
#include "aabb.h"
|
||||
#include "glm/glm.hpp"
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include "glm/gtx/hash.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
@@ -35,16 +37,9 @@ public:
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
struct std::hash<rayvec3>{
|
||||
std::size_t operator()(const rayvec3& r) const noexcept{
|
||||
return std::hash<scalar_t>{}(r.x) ^ (std::hash<scalar_t>{}(r.y) << 1) ^ (std::hash<scalar_t>{}(r.z) << 2);
|
||||
}
|
||||
};
|
||||
|
||||
class Ray{
|
||||
protected:
|
||||
static const bool IS_RAYS_BOX_CACHE_ON = false;
|
||||
static const bool IS_RAYS_BOX_CACHE_ON = false; // Now not working properly because not observe updates
|
||||
static std::unordered_map<rayvec3, AABBFaces> raysBoxCache_; //[boxPos]: faces array
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user