Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
ActiveObject Class Referenceabstract

#include <activeobject.h>

+ Inheritance diagram for ActiveObject:

Public Types

typedef u16 object_t
 

Public Member Functions

 ActiveObject (object_t id)
 
object_t getId () const
 
void setId (object_t id)
 
virtual ActiveObjectType getType () const =0
 
virtual bool getCollisionBox (aabb3f *toset) const =0
 
virtual bool getSelectionBox (aabb3f *toset) const =0
 
virtual bool collideWithObjects () const =0
 
virtual void setAttachment (object_t parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible)
 
virtual void getAttachment (object_t *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const
 
virtual void clearChildAttachments ()
 
virtual void clearParentAttachment ()
 
virtual void addAttachmentChild (object_t child_id)
 
virtual void removeAttachmentChild (object_t child_id)
 

Protected Attributes

object_t m_id
 

Member Typedef Documentation

◆ object_t

Constructor & Destructor Documentation

◆ ActiveObject()

ActiveObject::ActiveObject ( object_t id)
inline

Member Function Documentation

◆ addAttachmentChild()

virtual void ActiveObject::addAttachmentChild ( object_t child_id)
inlinevirtual

Reimplemented in GenericCAO, and UnitSAO.

Referenced by UnitSAO::onAttach(), and GenericCAO::setAttachment().

+ Here is the caller graph for this function:

◆ clearChildAttachments()

virtual void ActiveObject::clearChildAttachments ( )
inlinevirtual

Reimplemented in GenericCAO, and UnitSAO.

◆ clearParentAttachment()

virtual void ActiveObject::clearParentAttachment ( )
inlinevirtual

References setAttachment().

Referenced by UnitSAO::clearAnyAttachments(), Server::HandlePlayerDeath(), ObjectRef::l_set_detach(), GenericCAO::processMessage(), GenericCAO::removeFromScene(), LuaEntitySAO::step(), and PlayerSAO::step().

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

◆ collideWithObjects()

virtual bool ActiveObject::collideWithObjects ( ) const
pure virtual

◆ getAttachment()

virtual void ActiveObject::getAttachment ( object_t * parent_id,
std::string * bone,
v3f * position,
v3f * rotation,
bool * force_visible ) const
inlinevirtual

Reimplemented in GenericCAO, and UnitSAO.

Referenced by ObjectRef::l_get_attach().

+ Here is the caller graph for this function:

◆ getCollisionBox()

virtual bool ActiveObject::getCollisionBox ( aabb3f * toset) const
pure virtual

Returns the collision box of the object. This box is translated by the object's location. The box's coordinates are world coordinates.

Returns
true if the object has a collision box.

Implemented in ClientActiveObject, GenericCAO, LuaEntitySAO, MockActiveObject, MockServerActiveObject, PlayerSAO, and TestCAO.

◆ getId()

◆ getSelectionBox()

virtual bool ActiveObject::getSelectionBox ( aabb3f * toset) const
pure virtual

Returns the selection box of the object. This box is not translated when the object moves. The box's coordinates are world coordinates.

Returns
true if the object has a selection box.

Implemented in ClientActiveObject, GenericCAO, LuaEntitySAO, MockActiveObject, MockServerActiveObject, PlayerSAO, and TestSelectableClientActiveObject.

◆ getType()

◆ removeAttachmentChild()

virtual void ActiveObject::removeAttachmentChild ( object_t child_id)
inlinevirtual

Reimplemented in GenericCAO, and UnitSAO.

Referenced by UnitSAO::onDetach(), and GenericCAO::setAttachment().

+ Here is the caller graph for this function:

◆ setAttachment()

virtual void ActiveObject::setAttachment ( object_t parent_id,
const std::string & bone,
v3f position,
v3f rotation,
bool force_visible )
inlinevirtual

Reimplemented in GenericCAO, and UnitSAO.

Referenced by clearParentAttachment(), and ObjectRef::l_set_attach().

+ Here is the caller graph for this function:

◆ setId()

void ActiveObject::setId ( object_t id)
inline

References m_id.

Referenced by TestMoveAction::runTests(), and TestActiveObject::testAOAttributes().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_id


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