Binary space partition tree (kd-style AABB splits) for 3D culling. Alternating X/Y/Z splits at node midplanes. 更多...
#include <BSPTree3D.h>
Public 成员函数 | |
| BSPTree3D (float minX, float minY, float minZ, float maxX, float maxY, float maxZ, int maxDepth=12, int maxPerNode=8) | |
| ~BSPTree3D ()=default | |
| BSPTree3D (const BSPTree3D &)=delete | |
| BSPTree3D & | operator= (const BSPTree3D &)=delete |
| void | clear () |
| bool | insert (int id, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) |
| bool | remove (int id) |
| bool | update (int id, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) |
| bool | contains (int id) const |
| int | getCount () const |
| int | queryPoint (float x, float y, float z) |
| int | queryAABB (float minX, float minY, float minZ, float maxX, float maxY, float maxZ) |
| int | querySphere (float cx, float cy, float cz, float radius) |
| int | getResultCount () const |
| int | getResultId (int index) const |
| float | getMinX () const |
| float | getMinY () const |
| float | getMinZ () const |
| float | getMaxX () const |
| float | getMaxY () const |
| float | getMaxZ () const |
| int | getMaxDepth () const |
| int | getMaxPerNode () const |
详细描述
Binary space partition tree (kd-style AABB splits) for 3D culling. Alternating X/Y/Z splits at node midplanes.
在文件 BSPTree3D.h 第 16 行定义.
构造及析构函数说明
◆ BSPTree3D() [1/2]
| eve::spatial::BSPTree3D::BSPTree3D | ( | float | minX, |
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ, | ||
| int | maxDepth = 12, |
||
| int | maxPerNode = 8 |
||
| ) |
◆ ~BSPTree3D()
|
default |
◆ BSPTree3D() [2/2]
|
delete |
成员函数说明
◆ clear()
| void eve::spatial::BSPTree3D::clear | ( | ) |
在文件 BSPTree3D.cpp 第 29 行定义.
◆ contains()
| bool eve::spatial::BSPTree3D::contains | ( | int | id | ) | const |
在文件 BSPTree3D.cpp 第 36 行定义.
◆ getCount()
|
inline |
在文件 BSPTree3D.h 第 30 行定义.
◆ getMaxDepth()
|
inline |
在文件 BSPTree3D.h 第 45 行定义.
◆ getMaxPerNode()
|
inline |
在文件 BSPTree3D.h 第 46 行定义.
◆ getMaxX()
|
inline |
在文件 BSPTree3D.h 第 42 行定义.
◆ getMaxY()
|
inline |
在文件 BSPTree3D.h 第 43 行定义.
◆ getMaxZ()
|
inline |
在文件 BSPTree3D.h 第 44 行定义.
◆ getMinX()
|
inline |
在文件 BSPTree3D.h 第 39 行定义.
◆ getMinY()
|
inline |
在文件 BSPTree3D.h 第 40 行定义.
◆ getMinZ()
|
inline |
在文件 BSPTree3D.h 第 41 行定义.
◆ getResultCount()
|
inline |
在文件 BSPTree3D.h 第 36 行定义.
◆ getResultId()
|
inline |
在文件 BSPTree3D.h 第 37 行定义.
◆ insert()
| bool eve::spatial::BSPTree3D::insert | ( | int | id, |
| float | minX, | ||
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ | ||
| ) |
在文件 BSPTree3D.cpp 第 38 行定义.
引用了 b, contains(), id, eve::spatial::makeAABB3() , 以及 remove().
被这些函数引用 update().
◆ operator=()
◆ queryAABB()
| int eve::spatial::BSPTree3D::queryAABB | ( | float | minX, |
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ | ||
| ) |
◆ queryPoint()
| int eve::spatial::BSPTree3D::queryPoint | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
在文件 BSPTree3D.cpp 第 194 行定义.
引用了 eve::spatial::QueryIds::clear(), eve::spatial::QueryIds::getCount(), x, y , 以及 z.
◆ querySphere()
| int eve::spatial::BSPTree3D::querySphere | ( | float | cx, |
| float | cy, | ||
| float | cz, | ||
| float | radius | ||
| ) |
在文件 BSPTree3D.cpp 第 207 行定义.
引用了 eve::spatial::QueryIds::clear(), cx, cy , 以及 eve::spatial::QueryIds::getCount().
◆ remove()
| bool eve::spatial::BSPTree3D::remove | ( | int | id | ) |
◆ update()
| bool eve::spatial::BSPTree3D::update | ( | int | id, |
| float | minX, | ||
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ | ||
| ) |
在文件 BSPTree3D.cpp 第 57 行定义.
引用了 contains() , 以及 insert().
该类的文档由以下文件生成:
- src/modules/spatial/BSPTree3D.h
- src/modules/spatial/BSPTree3D.cpp