Minetest  5.4.0
client::ActiveObjectMgr Class Reference

#include <activeobjectmgr.h>

+ Inheritance diagram for client::ActiveObjectMgr:
+ Collaboration diagram for client::ActiveObjectMgr:

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 >
ClientActiveObjectgetActiveObject (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
 

Member Function Documentation

◆ clear()

void ActiveObjectMgr< T >::clear ( )

References ActiveObjectMgr< ClientActiveObject >::m_active_objects.

Referenced by ClientEnvironment::~ClientEnvironment(), TestClientActiveObjectMgr::testFreeID(), TestClientActiveObjectMgr::testRegisterObject(), and TestClientActiveObjectMgr::testRemoveObject().

+ Here is the caller graph for this function:

◆ getActiveObjects()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerObject()

bool ActiveObjectMgr< T >::registerObject ( ClientActiveObject obj)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeObject()

void ActiveObjectMgr< T >::removeObject ( u16  id)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step()

void ActiveObjectMgr< T >::step ( float  dtime,
const std::function< void(ClientActiveObject *)> &  f 
)
overridevirtual

Implements ActiveObjectMgr< ClientActiveObject >.

References Profiler::avg(), g_profiler, and ActiveObjectMgr< ClientActiveObject >::m_active_objects.

Referenced by ClientEnvironment::step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: