Owning sparse broadphase workspace; integer cell/row order and stable tie-key bucket order. @ownership Contains numeric slots only, no borrowed positions or entity pointers. @thread Owner thread. @reentrancy Queries cannot mutate the index or call unknown callbacks. @cost Storage scales with agents and occupied cells, not their bounding rectangle. 更多...
#include <CrowdSpatialIndex.h>
Public 成员函数 | |
| void | rebuild (std::span< const float > xs, std::span< const float > ys, std::span< const CrowdTieKey > ties, double cellSize, std::int64_t maxCells, std::int64_t &comparisons) |
| Rebuild owning directories; failure is handled by the surrounding advance rollback. @ownership Copies numeric values; input spans are borrowed only for this call. @thread Owner thread. @reentrancy No callbacks. @cost Agent sorting and occupied-cell grouping per rebuild, amortized by queries in that phase. | |
| void | clear () noexcept |
| Invalidate derived directories without releasing reusable capacity; no callbacks. | |
| std::size_t | cellCount () const noexcept |
| Observe occupied cell count; constant time, owner thread. | |
| template<class Fn > | |
| void | visit (double x, double y, double radius, std::int64_t maxVisits, std::int64_t &visits, std::int64_t &visitedCells, Fn &&fn) const |
| Enumerate conservative candidates in a query box with explicit lookup-work charging. @ownership Borrows this index during the call. Callback must not mutate it or retain index references. @thread Owner thread. @reentrancy Only known synchronous internal callbacks. @cost Row/cell binary searches plus occupied cells and candidates in the requested box. | |
详细描述
Owning sparse broadphase workspace; integer cell/row order and stable tie-key bucket order. @ownership Contains numeric slots only, no borrowed positions or entity pointers. @thread Owner thread. @reentrancy Queries cannot mutate the index or call unknown callbacks. @cost Storage scales with agents and occupied cells, not their bounding rectangle.
在文件 CrowdSpatialIndex.h 第 28 行定义.
成员函数说明
◆ cellCount()
|
inlinenoexcept |
Observe occupied cell count; constant time, owner thread.
在文件 CrowdSpatialIndex.h 第 64 行定义.
◆ clear()
|
inlinenoexcept |
Invalidate derived directories without releasing reusable capacity; no callbacks.
在文件 CrowdSpatialIndex.h 第 58 行定义.
被这些函数引用 rebuild() , 以及 eve::crowd::Crowd::Impl::AdvanceGuard::~AdvanceGuard().
◆ rebuild()
| void eve::crowd::CrowdSpatialIndex::rebuild | ( | std::span< const float > | xs, |
| std::span< const float > | ys, | ||
| std::span< const CrowdTieKey > | ties, | ||
| double | cellSize, | ||
| std::int64_t | maxCells, | ||
| std::int64_t & | comparisons | ||
| ) |
Rebuild owning directories; failure is handled by the surrounding advance rollback. @ownership Copies numeric values; input spans are borrowed only for this call. @thread Owner thread. @reentrancy No callbacks. @cost Agent sorting and occupied-cell grouping per rebuild, amortized by queries in that phase.
在文件 CrowdSpatialIndex.cpp 第 15 行定义.
◆ visit()
|
inline |
Enumerate conservative candidates in a query box with explicit lookup-work charging. @ownership Borrows this index during the call. Callback must not mutate it or retain index references. @thread Owner thread. @reentrancy Only known synchronous internal callbacks. @cost Row/cell binary searches plus occupied cells and candidates in the requested box.
在文件 CrowdSpatialIndex.h 第 71 行定义.
该类的文档由以下文件生成:
- src/modules/crowd/CrowdSpatialIndex.h
- src/modules/crowd/CrowdSpatialIndex.cpp