#include <activeobjectmgr.h>
Public Member Functions | |
| ~ActiveObjectMgr () override | |
| void | step (float dtime, const std::function< void(ClientActiveObject *)> &f) override |
| bool | registerObject (std::unique_ptr< ClientActiveObject > obj) override |
| void | removeObject (u16 id) override |
| void | getActiveObjects (const v3f &origin, f32 max_d, std::vector< DistanceSortedActiveObject > &dest) |
| std::vector< DistanceSortedActiveObject > | getActiveSelectableObjects (const core::line3d< f32 > &shootline) |
Gets all CAOs whose selection boxes may intersect the shootline. | |
| Public Member Functions inherited from ActiveObjectMgr< ClientActiveObject > | |
| ActiveObjectMgr ()=default | |
| DISABLE_CLASS_COPY (ActiveObjectMgr) | |
| void | clear () |
| 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 > | |
| ModifySafeMap< u16, std::unique_ptr< ClientActiveObject > > | m_active_objects |
|
overridevirtual |
Reimplemented from ActiveObjectMgr< ClientActiveObject >.
References ActiveObjectMgr< ClientActiveObject >::clear(), ActiveObjectMgr< ClientActiveObject >::m_active_objects, and warningstream.
| void ActiveObjectMgr< T >::getActiveObjects | ( | const v3f & | origin, |
| f32 | max_d, | ||
| std::vector< DistanceSortedActiveObject > & | dest ) |
References ClientActiveObject::getPosition(), and ActiveObjectMgr< ClientActiveObject >::m_active_objects.
| std::vector< DistanceSortedActiveObject > ActiveObjectMgr< T >::getActiveSelectableObjects | ( | const core::line3d< f32 > & | shootline | ) |
Gets all CAOs whose selection boxes may intersect the shootline.
shootline. References dir(), ClientActiveObject::getPosition(), ClientActiveObject::getSelectionBox(), and ActiveObjectMgr< ClientActiveObject >::m_active_objects.
Referenced by TestClientActiveObjectMgr::testGetActiveSelectableObjects().
|
overridevirtual |
Implements ActiveObjectMgr< ClientActiveObject >.
References ActiveObjectMgr< ClientActiveObject >::getFreeId(), infostream, ActiveObjectMgr< ClientActiveObject >::isFreeId(), and ActiveObjectMgr< ClientActiveObject >::m_active_objects.
Referenced by register_default_test_object(), and TestClientActiveObjectMgr::testGetActiveSelectableObjects().
|
overridevirtual |
Implements ActiveObjectMgr< ClientActiveObject >.
References infostream, ActiveObjectMgr< ClientActiveObject >::m_active_objects, and verbosestream.
Referenced by TEST_CASE().
|
overridevirtual |
Implements ActiveObjectMgr< ClientActiveObject >.
References g_profiler, and ActiveObjectMgr< ClientActiveObject >::m_active_objects.