Minetest  5.4.0
ActiveObject Class Referenceabstract

#include <activeobject.h>

+ Inheritance diagram for ActiveObject:

Public Member Functions

 ActiveObject (u16 id)
 
u16 getId () const
 
void setId (u16 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 (int parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible)
 
virtual void getAttachment (int *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const
 
virtual void clearChildAttachments ()
 
virtual void clearParentAttachment ()
 
virtual void addAttachmentChild (int child_id)
 
virtual void removeAttachmentChild (int child_id)
 

Protected Attributes

u16 m_id
 

Constructor & Destructor Documentation

◆ ActiveObject()

ActiveObject::ActiveObject ( u16  id)
inline

Member Function Documentation

◆ addAttachmentChild()

virtual void ActiveObject::addAttachmentChild ( int  child_id)
inlinevirtual

Reimplemented in UnitSAO, and GenericCAO.

Referenced by ObjectRef::l_set_attach(), and GenericCAO::setAttachment().

+ Here is the caller graph for this function:

◆ clearChildAttachments()

virtual void ActiveObject::clearChildAttachments ( )
inlinevirtual

Reimplemented in UnitSAO, and GenericCAO.

Referenced by ObjectRef::l_remove().

+ Here is the caller graph for this function:

◆ clearParentAttachment()

virtual void ActiveObject::clearParentAttachment ( )
inlinevirtual

Reimplemented in UnitSAO, and GenericCAO.

Referenced by ObjectRef::l_remove(), and ObjectRef::l_set_detach().

+ Here is the caller graph for this function:

◆ collideWithObjects()

virtual bool ActiveObject::collideWithObjects ( ) const
pure virtual

Implemented in TestServerActiveObject, TestAO, PlayerSAO, LuaEntitySAO, GenericCAO, and ClientActiveObject.

Referenced by collisionMoveSimple().

+ Here is the caller graph for this function:

◆ getAttachment()

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

Reimplemented in UnitSAO, and GenericCAO.

Referenced by getAttachedObject(), ObjectRef::l_get_attach(), and ObjectRef::l_set_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 TestServerActiveObject, TestAO, PlayerSAO, LuaEntitySAO, GenericCAO, TestCAO, and ClientActiveObject.

Referenced by collisionMoveSimple().

+ Here is the caller graph for this function:

◆ 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 TestServerActiveObject, TestAO, PlayerSAO, LuaEntitySAO, GenericCAO, and ClientActiveObject.

◆ getType()

◆ removeAttachmentChild()

virtual void ActiveObject::removeAttachmentChild ( int  child_id)
inlinevirtual

Reimplemented in UnitSAO, and GenericCAO.

Referenced by UnitSAO::clearParentAttachment(), ObjectRef::l_set_attach(), and GenericCAO::setAttachment().

+ Here is the caller graph for this function:

◆ setAttachment()

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

Reimplemented in UnitSAO, and GenericCAO.

Referenced by ObjectRef::l_set_attach().

+ Here is the caller graph for this function:

◆ setId()

void ActiveObject::setId ( u16  id)
inline

References m_id.

Referenced by ClientEnvironment::addActiveObject(), client::ActiveObjectMgr::registerObject(), server::ActiveObjectMgr::registerObject(), 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: