#include <activeobjectmgr.h>
Public Member Functions | |
void | clear () |
void | step (float dtime, const std::function< void(ClientActiveObject *)> &f) override |
bool | registerObject (ClientActiveObject *obj) override |
void | removeObject (u16 id) override |
void | getActiveObjects (const v3f &origin, f32 max_d, std::vector< DistanceSortedActiveObject > &dest) |
Public Member Functions inherited from ActiveObjectMgr< ClientActiveObject > | |
ClientActiveObject * | getActiveObject (u16 id) |
Additional Inherited Members | |
Protected Member Functions inherited from ActiveObjectMgr< ClientActiveObject > | |
u16 | getFreeId () const |
bool | isFreeId (u16 id) const |
Protected Attributes inherited from ActiveObjectMgr< ClientActiveObject > | |
std::unordered_map< u16, ClientActiveObject * > | m_active_objects |
void ActiveObjectMgr< T >::clear | ( | ) |
References ActiveObjectMgr< ClientActiveObject >::m_active_objects.
Referenced by ClientEnvironment::~ClientEnvironment(), TestClientActiveObjectMgr::testFreeID(), TestClientActiveObjectMgr::testRegisterObject(), and TestClientActiveObjectMgr::testRemoveObject().
void ActiveObjectMgr< T >::getActiveObjects | ( | const v3f & | origin, |
f32 | max_d, | ||
std::vector< DistanceSortedActiveObject > & | dest | ||
) |
References ClientActiveObject::getPosition(), and ActiveObjectMgr< ClientActiveObject >::m_active_objects.
Referenced by ClientEnvironment::getActiveObjects().
|
overridevirtual |
Implements ActiveObjectMgr< ClientActiveObject >.
References ActiveObjectMgr< ClientActiveObject >::getFreeId(), ActiveObject::getId(), infostream, ActiveObjectMgr< ClientActiveObject >::isFreeId(), ActiveObjectMgr< ClientActiveObject >::m_active_objects, and ActiveObject::setId().
Referenced by ClientEnvironment::addActiveObject(), TestClientActiveObjectMgr::testFreeID(), TestClientActiveObjectMgr::testRegisterObject(), and TestClientActiveObjectMgr::testRemoveObject().
|
overridevirtual |
Implements ActiveObjectMgr< ClientActiveObject >.
References ActiveObjectMgr< ClientActiveObject >::getActiveObject(), infostream, ActiveObjectMgr< ClientActiveObject >::m_active_objects, ClientActiveObject::removeFromScene(), and verbosestream.
Referenced by ClientEnvironment::removeActiveObject(), and TestClientActiveObjectMgr::testRemoveObject().
|
overridevirtual |
Implements ActiveObjectMgr< ClientActiveObject >.
References Profiler::avg(), g_profiler, and ActiveObjectMgr< ClientActiveObject >::m_active_objects.
Referenced by ClientEnvironment::step().