Luanti 5.16.0-dev
Loading...
Searching...
No Matches
client::ActiveObjectMgr Class Referencefinal

#include <activeobjectmgr.h>

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

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< DistanceSortedActiveObjectgetActiveSelectableObjects (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 ()
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 >
ModifySafeMap< u16, std::unique_ptr< ClientActiveObject > > m_active_objects

Constructor & Destructor Documentation

◆ ~ActiveObjectMgr()

ActiveObjectMgr< T >::~ActiveObjectMgr ( )
overridevirtual

Reimplemented from ActiveObjectMgr< ClientActiveObject >.

References ActiveObjectMgr< ClientActiveObject >::clear(), ActiveObjectMgr< ClientActiveObject >::m_active_objects, and warningstream.

Here is the call graph for this function:

Member Function Documentation

◆ getActiveObjects()

void ActiveObjectMgr< T >::getActiveObjects ( const v3f & origin,
f32 max_d,
std::vector< DistanceSortedActiveObject > & dest )

References ClientActiveObject::getPosition(), and ActiveObjectMgr< ClientActiveObject >::m_active_objects.

Here is the call graph for this function:

◆ getActiveSelectableObjects()

std::vector< DistanceSortedActiveObject > ActiveObjectMgr< T >::getActiveSelectableObjects ( const core::line3d< f32 > & shootline)

Gets all CAOs whose selection boxes may intersect the shootline.

Note
CAOs without a selection box are not returned.
Distances are along the shootline.

References dir(), ClientActiveObject::getPosition(), ClientActiveObject::getSelectionBox(), and ActiveObjectMgr< ClientActiveObject >::m_active_objects.

Referenced by TestClientActiveObjectMgr::testGetActiveSelectableObjects().

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

◆ registerObject()

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

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 infostream, ActiveObjectMgr< ClientActiveObject >::m_active_objects, and verbosestream.

Referenced by TEST_CASE().

Here is the caller graph for this function:

◆ step()

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

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