diff options
author | nathan <nathan@disroot.org> | 2025-07-09 08:49:54 +0000 |
---|---|---|
committer | nathan <nathan@disroot.org> | 2025-07-09 08:49:54 +0000 |
commit | d594afee3b6c55f24ecf05663b688ea488f073e6 (patch) | |
tree | 9fd0a9105e0e09520892074756a674496d0930f1 /src/world.h | |
parent | 6bd4182fbed898ad68c6b425707bbd2c5ef1e115 (diff) | |
download | FindThings-d594afee3b6c55f24ecf05663b688ea488f073e6.tar.gz FindThings-d594afee3b6c55f24ecf05663b688ea488f073e6.tar.bz2 FindThings-d594afee3b6c55f24ecf05663b688ea488f073e6.zip |
Finally some speed and no overlap!
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/world.h b/src/world.h index 1840af3..60cbe9f 100644 --- a/src/world.h +++ b/src/world.h @@ -7,10 +7,9 @@ #ifndef WORLD_H #define WORLD_H -#define BVH_MAX 4 // Max entities per node. -#define BVH_LEAF_COUNT 250 -#define BVH_OVERLAP_MULTIPLIER 100.0 +#define BVH_MAX 2 // Max entities per node. #define BVH_MAX_BRANCH_COUNT 3 +#define BVH_BOX_MAX 100.0 #define WORLD_ENTITY_MAX 1000 #define WORLD_SIZE (Vector3){1000.0, 100.0, 1000.0} @@ -33,6 +32,8 @@ typedef struct { Model heightmap; Entity entities[WORLD_ENTITY_MAX]; BVHNode bvh; + BVHNode bvhTest[WORLD_ENTITY_MAX]; + size_t bvhTestSize; } World; World createWorld(int seed); |