diff options
author | nathan <nathan@disroot.org> | 2025-07-09 07:31:19 +0000 |
---|---|---|
committer | nathan <nathan@disroot.org> | 2025-07-09 07:31:19 +0000 |
commit | 6bd4182fbed898ad68c6b425707bbd2c5ef1e115 (patch) | |
tree | d7ba8786ee3a079df4f0c905459cc29de38468be /src/world.h | |
parent | 97b16e669943025d367c2022a148026f338cf7f0 (diff) | |
download | FindThings-6bd4182fbed898ad68c6b425707bbd2c5ef1e115.tar.gz FindThings-6bd4182fbed898ad68c6b425707bbd2c5ef1e115.tar.bz2 FindThings-6bd4182fbed898ad68c6b425707bbd2c5ef1e115.zip |
Going to move on to the next part of BVH
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/world.h b/src/world.h index 69c2015..1840af3 100644 --- a/src/world.h +++ b/src/world.h @@ -10,6 +10,7 @@ #define BVH_MAX 4 // Max entities per node. #define BVH_LEAF_COUNT 250 #define BVH_OVERLAP_MULTIPLIER 100.0 +#define BVH_MAX_BRANCH_COUNT 3 #define WORLD_ENTITY_MAX 1000 #define WORLD_SIZE (Vector3){1000.0, 100.0, 1000.0} @@ -23,8 +24,7 @@ typedef int16_t WorldUID; typedef struct BVHNode { BoundingBox box; WorldUID entities[BVH_MAX]; // Only for leafs. - struct BVHNode* branch1; - struct BVHNode* branch2; + struct BVHNode* branches[BVH_MAX_BRANCH_COUNT]; } BVHNode; typedef struct { @@ -33,8 +33,6 @@ typedef struct { Model heightmap; Entity entities[WORLD_ENTITY_MAX]; BVHNode bvh; - BVHNode bvhTest[WORLD_ENTITY_MAX]; - int bvhTestSize; } World; World createWorld(int seed); |