mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
refactoring btw
This commit is contained in:
parent
bcfdc55277
commit
76475dd1b1
6 changed files with 21 additions and 26 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue