30 static_assert(std::is_invocable_v<IndexToItem, Index>);
31 using Item =
decltype(std::declval<IndexToItem>()(std::declval<Index>()));
37 static_assert(std::is_invocable_r_v<AABB3D, ItemToAABB, Item>);
42 IndexToItem indexToItem,
43 ItemToAABB itemToAABB,
46 template<
typename TesterFunc>
56 void buildNodeRecursive(
57 std::size_t nodeIndex,
59 const Index* nodeItemIndices,
60 std::size_t numNodeItems,
61 std::size_t currentNodeDepth,
62 std::size_t currentBadRefines,
63 const std::vector<AABB3D>& itemAABBs,
64 std::size_t maxNodeDepth,
66 Index* negativeItemIndicesCache,
67 Index* positiveItemIndicesCache,
68 std::array<std::unique_ptr<
ItemEndpoint[]>, 3>& endpointsCache);
71 std::size_t m_numItems;
72 IndexToItem m_indexToItem;
74 std::vector<Node> m_nodeBuffer;
75 std::size_t m_numNodes;
76 std::vector<Index> m_itemIndices;
TIndexedKdtree(std::size_t numItems, IndexToItem indexToItem, ItemToAABB itemToAABB, IndexedKdtreeParams params=IndexedKdtreeParams())
Definition TIndexedKdtree.ipp:20