1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00: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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)