1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 09:25:37 +02:00

Add spatial index for objects (#14631)

This commit is contained in:
Lars Müller
2025-04-08 08:44:53 +02:00
committed by GitHub
parent bed36139db
commit a3648b0b16
17 changed files with 982 additions and 116 deletions

View File

@@ -220,6 +220,11 @@ public:
// Find the daylight value at pos with a Depth First Search
u8 findSunlight(v3s16 pos) const;
void updateObjectPos(u16 id, v3f pos)
{
return m_ao_manager.updateObjectPos(id, pos);
}
// Find all active objects inside a radius around a point
void getObjectsInsideRadius(std::vector<ServerActiveObject *> &objects, const v3f &pos, float radius,
std::function<bool(ServerActiveObject *obj)> include_obj_cb)