载入中...
搜索中...
未找到
Spatial.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Module.h"
4
5namespace eve::spatial {
6
7class QuadTree;
8class Octree;
9class SpatialHash2D;
10class SpatialHash3D;
11class BSPTree2D;
12class BSPTree3D;
13
22public:
25 Spatial() = default;
27 ~Spatial() override = default;
28
30 QuadTree *newQuadTree(float minX, float minY, float maxX, float maxY, int maxDepth = 8,
31 int maxPerNode = 8);
33 Octree *newOctree(float minX, float minY, float minZ, float maxX, float maxY, float maxZ,
34 int maxDepth = 8, int maxPerNode = 8);
35
37 SpatialHash2D *newSpatialHash2D(float cellSize = 64.f);
39 SpatialHash3D *newSpatialHash3D(float cellSize = 64.f);
40
42 BSPTree2D *newBSPTree2D(float minX, float minY, float maxX, float maxY, int maxDepth = 12,
43 int maxPerNode = 8);
45 BSPTree3D *newBSPTree3D(float minX, float minY, float minZ, float maxX, float maxY, float maxZ,
46 int maxDepth = 12, int maxPerNode = 8);
47};
48
49} // namespace eve::spatial
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
EVENGINE_API_FOUNDATION public API.
Definition Module.h:46
Binary space partition tree (kd-style AABB splits) for 2D culling. Alternating X/Y splits at node mid...
Definition BSPTree2D.h:18
Binary space partition tree (kd-style AABB splits) for 3D culling. Alternating X/Y/Z splits at node m...
Definition BSPTree3D.h:18
Region octree for 3D AABB broad-phase / scene culling. Same storage rules as QuadTree (smallest fully...
Definition Octree.h:18
Region quadtree for 2D AABB broad-phase / map culling. Items are stored in the smallest node that ful...
Definition QuadTree.h:19
Uniform-grid spatial hash for 2D AABB queries (map / particle / entity culling). Items are registered...
Uniform-grid spatial hash for 3D AABB / sphere queries.
Spatial index module — broad-phase / map culling structures. Script: spatial <- eve....
Definition Spatial.h:21
~Spatial() override=default
No owned indexes; factories return caller-owned pointers.
Spatial()=default
Default-constructs the spatial module.