12#include <unordered_map>
41 void appendTo(std::string &data)
const;
81 if (progress > 1.0f ||
position.interp_duration == 0.0f)
102 if (progress > 1.0f ||
rotation.interp_duration == 0.0f)
106 core::quaternion anim_rot(anim_rot_euler * core::DEGTORAD);
107 rot = rot * anim_rot;
111 rot.toEuler(rot_euler);
112 return rot_euler * core::RADTODEG;
125 if (progress > 1.0f ||
scale.interp_duration == 0.0f)
127 return scale.vector.getInterpolated(
scale.previous, progress)
128 * (
scale.absolute ?
v3f(1.0f) : anim_scale);
137 scale.interp_duration);
202 v3f rotation,
bool force_visible) {}
204 v3f *rotation,
bool *force_visible)
const {}
std::unordered_map< std::string, BoneOverride > BoneOverrideMap
Definition activeobject.h:149
ActiveObjectCommand
Definition activeobject.h:48
@ AO_CMD_SET_TEXTURE_MOD
Definition activeobject.h:51
@ AO_CMD_OBSOLETE1
Definition activeobject.h:59
@ AO_CMD_SPAWN_INFANT
Definition activeobject.h:61
@ AO_CMD_SET_PROPERTIES
Definition activeobject.h:49
@ AO_CMD_PUNCHED
Definition activeobject.h:53
@ AO_CMD_UPDATE_POSITION
Definition activeobject.h:50
@ AO_CMD_SET_PHYSICS_OVERRIDE
Definition activeobject.h:58
@ AO_CMD_SET_ANIMATION
Definition activeobject.h:55
@ AO_CMD_SET_ANIMATION_SPEED
Definition activeobject.h:62
@ AO_CMD_ATTACH_TO
Definition activeobject.h:57
@ AO_CMD_UPDATE_ARMOR_GROUPS
Definition activeobject.h:54
@ AO_CMD_SET_BONE_POSITION
Definition activeobject.h:56
@ AO_CMD_STOP_ANIMATION
Definition activeobject.h:64
@ AO_CMD_SET_SPRITE
Definition activeobject.h:52
ActiveObjectType
Definition activeobject.h:15
@ ACTIVEOBJECT_TYPE_TEST
Definition activeobject.h:17
@ ACTIVEOBJECT_TYPE_PLAYER
Definition activeobject.h:27
@ ACTIVEOBJECT_TYPE_INVALID
Definition activeobject.h:16
@ ACTIVEOBJECT_TYPE_GENERIC
Definition activeobject.h:29
@ ACTIVEOBJECT_TYPE_LUAENTITY
Definition activeobject.h:25
virtual void clearParentAttachment()
Definition activeobject.h:208
object_t getId() const
Definition activeobject.h:165
virtual void setAttachment(object_t parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible)
Definition activeobject.h:201
virtual bool getCollisionBox(aabb3f *toset) const =0
ActiveObject(object_t id)
Definition activeobject.h:160
virtual void clearChildAttachments()
Definition activeobject.h:206
virtual void removeAttachmentChild(object_t child_id)
Definition activeobject.h:215
virtual void addAttachmentChild(object_t child_id)
Definition activeobject.h:214
virtual bool collideWithObjects() const =0
object_t m_id
Definition activeobject.h:218
void setId(object_t id)
Definition activeobject.h:170
virtual ActiveObjectType getType() const =0
virtual bool getSelectionBox(aabb3f *toset) const =0
u16 object_t
Definition activeobject.h:158
virtual void getAttachment(object_t *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const
Definition activeobject.h:203
core::aabbox3d< f32 > aabb3f
Definition irr_aabb3d.h:11
core::vector3df v3f
Definition irr_v3d.h:11
ActiveObjectMessage(u16 id_, bool reliable_=true, std::string_view data_="")
Definition activeobject.h:35
std::string datastring
Definition activeobject.h:45
void appendTo(std::string &data) const
Definition activeobject.cpp:8
u16 id
Definition activeobject.h:43
bool reliable
Definition activeobject.h:44
Definition activeobject.h:72
f32 interp_duration
Definition activeobject.h:76
bool absolute
Definition activeobject.h:75
v3f vector
Definition activeobject.h:74
v3f previous
Definition activeobject.h:73
Definition activeobject.h:88
f32 interp_duration
Definition activeobject.h:95
core::quaternion next
Definition activeobject.h:90
core::quaternion previous
Definition activeobject.h:89
bool absolute
Definition activeobject.h:94
v3f next_radians
Definition activeobject.h:93
Definition activeobject.h:116
v3f previous
Definition activeobject.h:117
v3f vector
Definition activeobject.h:118
bool absolute
Definition activeobject.h:119
f32 interp_duration
Definition activeobject.h:120
Definition activeobject.h:70
v3f getRotationEulerDeg(v3f anim_rot_euler) const
Definition activeobject.h:98
v3f getPosition(v3f anim_pos) const
Definition activeobject.h:79
bool isIdentity() const
Definition activeobject.h:140
v3f getScale(v3f anim_scale) const
Definition activeobject.h:123
bool finishedInterpolation() const
Definition activeobject.h:133
struct BoneOverride::ScaleProperty scale
f32 dtime_passed
Definition activeobject.h:131
struct BoneOverride::PositionProperty position
struct BoneOverride::RotationProperty rotation