Minetest  5.4.0
GenericCAO Class Reference

#include <content_cao.h>

+ Inheritance diagram for GenericCAO:
+ Collaboration diagram for GenericCAO:

Public Member Functions

 GenericCAO (Client *client, ClientEnvironment *env)
 
 ~GenericCAO ()
 
ActiveObjectType getType () const
 
const ItemGroupListgetGroups () const
 
void initialize (const std::string &data)
 
void processInitData (const std::string &data)
 
bool getCollisionBox (aabb3f *toset) const
 
bool collideWithObjects () const
 
virtual bool getSelectionBox (aabb3f *toset) const
 
const v3f getPosition () const
 
void setPosition (const v3f &pos)
 
const v3fgetRotation () const
 
const bool isImmortal ()
 
scene::ISceneNode * getSceneNode () const
 
scene::IAnimatedMeshSceneNode * getAnimatedMeshSceneNode () const
 
core::matrix4 & getPosRotMatrix ()
 
const core::matrix4 * getAbsolutePosRotMatrix () const
 
f32 getStepHeight () const
 
bool isLocalPlayer () const
 
bool isVisible () const
 
void setVisible (bool toset)
 
void setChildrenVisible (bool toset)
 
void setAttachment (int parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible)
 
void getAttachment (int *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const
 
void clearChildAttachments ()
 
void clearParentAttachment ()
 
void addAttachmentChild (int child_id)
 
void removeAttachmentChild (int child_id)
 
ClientActiveObjectgetParent () const
 
const std::unordered_set< int > & getAttachmentChildIds () const
 
void updateAttachments ()
 
void removeFromScene (bool permanent)
 
void addToScene (ITextureSource *tsrc)
 
void expireVisuals ()
 
void updateLight (u32 day_night_ratio)
 
void setNodeLight (u8 light)
 
u16 getLightPosition (v3s16 *pos)
 
void updateNametag ()
 
void updateMarker ()
 
void updateNodePos ()
 
void step (float dtime, ClientEnvironment *env)
 
void updateTexturePos ()
 
void updateTextures (std::string mod)
 
void updateAnimation ()
 
void updateAnimationSpeed ()
 
void updateBonePosition ()
 
void processMessage (const std::string &data)
 
bool directReportPunch (v3f dir, const ItemStack *punchitem=NULL, float time_from_last_punch=1000000)
 
std::string debugInfoText ()
 
std::string infoText ()
 
void updateMeshCulling ()
 
- Public Member Functions inherited from ClientActiveObject
 ClientActiveObject (u16 id, Client *client, ClientEnvironment *env)
 
virtual ~ClientActiveObject ()
 
virtual bool doShowSelectionBox ()
 
- Public Member Functions inherited from ActiveObject
 ActiveObject (u16 id)
 
u16 getId () const
 
void setId (u16 id)
 

Static Public Member Functions

static ClientActiveObjectcreate (Client *client, ClientEnvironment *env)
 
- Static Public Member Functions inherited from ClientActiveObject
static ClientActiveObjectcreate (ActiveObjectType type, Client *client, ClientEnvironment *env)
 

Private Member Functions

bool visualExpiryRequired (const ObjectProperties &newprops) const
 

Private Attributes

std::string m_name = ""
 
bool m_is_player = false
 
bool m_is_local_player = false
 
ObjectProperties m_prop
 
scene::ISceneManager * m_smgr = nullptr
 
Clientm_client = nullptr
 
aabb3f m_selection_box = aabb3f(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.)
 
scene::IMeshSceneNode * m_meshnode = nullptr
 
scene::IAnimatedMeshSceneNode * m_animated_meshnode = nullptr
 
WieldMeshSceneNodem_wield_meshnode = nullptr
 
scene::IBillboardSceneNode * m_spritenode = nullptr
 
scene::IDummyTransformationSceneNode * m_matrixnode = nullptr
 
Nametagm_nametag = nullptr
 
MinimapMarkerm_marker = nullptr
 
v3f m_position = v3f(0.0f, 10.0f * BS, 0)
 
v3f m_velocity
 
v3f m_acceleration
 
v3f m_rotation
 
u16 m_hp = 1
 
SmoothTranslator< v3fpos_translator
 
SmoothTranslatorWrappedv3f rot_translator
 
v2f m_tx_size = v2f(1,1)
 
v2s16 m_tx_basepos
 
bool m_initial_tx_basepos_set = false
 
bool m_tx_select_horiz_by_yawpitch = false
 
v2s32 m_animation_range
 
float m_animation_speed = 15.0f
 
float m_animation_blend = 0.0f
 
bool m_animation_loop = true
 
std::unordered_map< std::string, core::vector2d< v3f > > m_bone_position
 
int m_attachment_parent_id = 0
 
std::unordered_set< int > m_attachment_child_ids
 
std::string m_attachment_bone = ""
 
v3f m_attachment_position
 
v3f m_attachment_rotation
 
bool m_attached_to_local = false
 
bool m_force_visible = false
 
int m_anim_frame = 0
 
int m_anim_num_frames = 1
 
float m_anim_framelength = 0.2f
 
float m_anim_timer = 0.0f
 
ItemGroupList m_armor_groups
 
float m_reset_textures_timer = -1.0f
 
std::string m_previous_texture_modifier = ""
 
std::string m_current_texture_modifier = ""
 
bool m_visuals_expired = false
 
float m_step_distance_counter = 0.0f
 
u8 m_last_light = 255
 
bool m_is_visible = false
 
s8 m_glow = 0
 
video::E_MATERIAL_TYPE m_material_type
 
bool m_enable_shaders = false
 

Additional Inherited Members

- Protected Types inherited from ClientActiveObject
typedef ClientActiveObject *(* Factory) (Client *client, ClientEnvironment *env)
 
- Static Protected Member Functions inherited from ClientActiveObject
static void registerType (u16 type, Factory f)
 
- Protected Attributes inherited from ClientActiveObject
Clientm_client
 
ClientEnvironmentm_env
 
- Protected Attributes inherited from ActiveObject
u16 m_id
 

Constructor & Destructor Documentation

◆ GenericCAO()

GenericCAO::GenericCAO ( Client client,
ClientEnvironment env 
)

References create(), getType(), m_client, and ClientActiveObject::registerType().

Referenced by create().

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

◆ ~GenericCAO()

GenericCAO::~GenericCAO ( )

References removeFromScene().

+ Here is the call graph for this function:

Member Function Documentation

◆ addAttachmentChild()

void GenericCAO::addAttachmentChild ( int  child_id)
virtual

Reimplemented from ActiveObject.

References m_attachment_child_ids.

Referenced by processMessage().

+ Here is the caller graph for this function:

◆ addToScene()

void GenericCAO::addToScene ( ITextureSource tsrc)
virtual

Reimplemented from ClientActiveObject.

References ObjectProperties::backface_culling, BS, checkMeshNormals(), createCubeMesh(), ItemStack::deSerialize(), errorstream, RenderingEngine::get_scene_manager(), Client::getMesh(), getSceneNode(), IShaderSource::getShader(), IShaderSource::getShaderInfo(), Client::getShaderSource(), ITextureSource::getTextureForMesh(), ObjectProperties::glow, IGameDef::idef(), infostream, ObjectProperties::is_visible, m_animated_meshnode, m_client, m_current_texture_modifier, m_enable_shaders, m_is_player, m_last_light, m_material_type, m_matrixnode, m_meshnode, m_prop, m_reset_textures_timer, m_smgr, m_spritenode, m_visuals_expired, m_wield_meshnode, ShaderInfo::material, ObjectProperties::mesh, NDT_NORMAL, setAnimatedMeshColor(), setBillboardTextureMatrix(), WieldMeshSceneNode::setColor(), WieldMeshSceneNode::setItem(), setMeshColor(), setNodeLight(), ObjectProperties::shaded, ObjectProperties::textures, TILE_MATERIAL_ALPHA, TILE_MATERIAL_BASIC, TILE_MATERIAL_PLAIN, TILE_MATERIAL_PLAIN_ALPHA, updateAnimation(), updateAttachments(), updateBonePosition(), updateMarker(), updateMeshCulling(), updateNametag(), updateNodePos(), updateTextures(), ObjectProperties::use_texture_alpha, ObjectProperties::visual, ObjectProperties::visual_size, and ObjectProperties::wield_item.

Referenced by step().

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

◆ clearChildAttachments()

void GenericCAO::clearChildAttachments ( )
virtual

Reimplemented from ActiveObject.

References ClientEnvironment::getActiveObject(), m_attachment_child_ids, ClientActiveObject::m_env, and removeAttachmentChild().

Referenced by processMessage().

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

◆ clearParentAttachment()

void GenericCAO::clearParentAttachment ( )
virtual

Reimplemented from ActiveObject.

References m_attachment_parent_id, m_attachment_position, m_attachment_rotation, and setAttachment().

Referenced by processMessage(), and removeFromScene().

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

◆ collideWithObjects()

bool GenericCAO::collideWithObjects ( ) const
virtual

Reimplemented from ClientActiveObject.

References ObjectProperties::collideWithObjects, and m_prop.

◆ create()

static ClientActiveObject* GenericCAO::create ( Client client,
ClientEnvironment env 
)
inlinestatic

References GenericCAO().

Referenced by GenericCAO().

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

◆ debugInfoText()

std::string GenericCAO::debugInfoText ( )
virtual

Reimplemented from ClientActiveObject.

References m_armor_groups, and m_hp.

◆ directReportPunch()

bool GenericCAO::directReportPunch ( v3f  dir,
const ItemStack punchitem = NULL,
float  time_from_last_punch = 1000000 
)
virtual

◆ expireVisuals()

void GenericCAO::expireVisuals ( )
inline

References m_visuals_expired.

Referenced by processMessage().

+ Here is the caller graph for this function:

◆ getAbsolutePosRotMatrix()

const core::matrix4* GenericCAO::getAbsolutePosRotMatrix ( ) const
inline

References m_matrixnode.

◆ getAnimatedMeshSceneNode()

scene::IAnimatedMeshSceneNode * GenericCAO::getAnimatedMeshSceneNode ( ) const
virtual

Reimplemented from ClientActiveObject.

References m_animated_meshnode.

◆ getAttachment()

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

◆ getAttachmentChildIds()

const std::unordered_set<int>& GenericCAO::getAttachmentChildIds ( ) const
inlinevirtual

Reimplemented from ClientActiveObject.

References m_attachment_child_ids.

◆ getCollisionBox()

bool GenericCAO::getCollisionBox ( aabb3f toset) const
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.

Reimplemented from ClientActiveObject.

References BS, ObjectProperties::collisionbox, m_position, m_prop, and ObjectProperties::physical.

◆ getGroups()

const ItemGroupList& GenericCAO::getGroups ( ) const
inline

References m_armor_groups.

Referenced by isImmortal(), and LuaLocalPlayer::l_get_armor_groups().

+ Here is the caller graph for this function:

◆ getLightPosition()

u16 GenericCAO::getLightPosition ( v3s16 pos)

References BS, ObjectProperties::collisionbox, floatToInt(), m_position, and m_prop.

Referenced by updateLight().

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

◆ getParent()

ClientActiveObject * GenericCAO::getParent ( ) const
virtual

Reimplemented from ClientActiveObject.

References ClientEnvironment::getActiveObject(), m_attachment_parent_id, and ClientActiveObject::m_env.

Referenced by LocalPlayer::getParent(), getPosition(), processMessage(), step(), updateAttachments(), and updateNodePos().

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

◆ getPosition()

const v3f GenericCAO::getPosition ( ) const
virtual

Reimplemented from ClientActiveObject.

References BS, ClientEnvironment::getCameraOffset(), getParent(), intToFloat(), ClientActiveObject::m_env, m_matrixnode, m_position, pos_translator, and SmoothTranslator< T >::val_current.

Referenced by LocalPlayer::move(), LocalPlayer::old_move(), step(), and updateAttachments().

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

◆ getPosRotMatrix()

core::matrix4& GenericCAO::getPosRotMatrix ( )
inline

References m_matrixnode.

Referenced by updateAttachments(), and updateNodePos().

+ Here is the caller graph for this function:

◆ getRotation()

const v3f& GenericCAO::getRotation ( ) const
inline

References m_rotation.

◆ getSceneNode()

scene::ISceneNode * GenericCAO::getSceneNode ( ) const
virtual

Reimplemented from ClientActiveObject.

References m_animated_meshnode, m_meshnode, m_spritenode, and m_wield_meshnode.

Referenced by addToScene(), setNodeLight(), step(), updateMarker(), updateMeshCulling(), updateNametag(), and updateNodePos().

+ Here is the caller graph for this function:

◆ getSelectionBox()

bool GenericCAO::getSelectionBox ( aabb3f toset) const
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.

Reimplemented from ClientActiveObject.

References ObjectProperties::is_visible, m_is_local_player, m_is_visible, m_prop, m_selection_box, and ObjectProperties::pointable.

◆ getStepHeight()

f32 GenericCAO::getStepHeight ( ) const
inline

References m_prop, and ObjectProperties::stepheight.

Referenced by LocalPlayer::move().

+ Here is the caller graph for this function:

◆ getType()

ActiveObjectType GenericCAO::getType ( ) const
inlinevirtual

Implements ActiveObject.

References ACTIVEOBJECT_TYPE_GENERIC.

Referenced by GenericCAO().

+ Here is the caller graph for this function:

◆ infoText()

std::string GenericCAO::infoText ( )
inlinevirtual

Reimplemented from ClientActiveObject.

References ObjectProperties::infotext, and m_prop.

◆ initialize()

void GenericCAO::initialize ( const std::string &  data)
virtual

Reimplemented from ClientActiveObject.

References g_settings, Settings::getBool(), ClientEnvironment::getLocalPlayer(), Player::getName(), infostream, m_enable_shaders, ClientActiveObject::m_env, m_is_local_player, m_is_player, m_is_visible, m_name, m_prop, processInitData(), LocalPlayer::setCAO(), and ObjectProperties::show_on_minimap.

+ Here is the call graph for this function:

◆ isImmortal()

const bool GenericCAO::isImmortal ( )

References getGroups(), and itemgroup_get().

Referenced by LocalPlayer::isDead(), and ClientEnvironment::step().

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

◆ isLocalPlayer()

bool GenericCAO::isLocalPlayer ( ) const
inlinevirtual

Reimplemented from ClientActiveObject.

References m_is_local_player.

◆ isVisible()

bool GenericCAO::isVisible ( ) const
inline

References m_is_visible.

◆ processInitData()

void GenericCAO::processInitData ( const std::string &  data)

References deSerializeString16(), deSerializeString32(), errorstream, SmoothTranslator< T >::init(), m_hp, ActiveObject::m_id, m_is_player, m_name, m_position, m_rotation, pos_translator, processMessage(), readU16(), readU8(), readV3F32(), rot_translator, updateNodePos(), and wrapDegrees_0_360_v3f().

Referenced by initialize().

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

◆ processMessage()

void GenericCAO::processMessage ( const std::string &  data)
virtual

Reimplemented from ClientActiveObject.

References addAttachmentChild(), ClientEnvironment::addSimpleObject(), AO_CMD_ATTACH_TO, AO_CMD_OBSOLETE1, AO_CMD_PUNCHED, AO_CMD_SET_ANIMATION, AO_CMD_SET_ANIMATION_SPEED, AO_CMD_SET_BONE_POSITION, AO_CMD_SET_PHYSICS_OVERRIDE, AO_CMD_SET_PROPERTIES, AO_CMD_SET_SPRITE, AO_CMD_SET_TEXTURE_MOD, AO_CMD_SPAWN_INFANT, AO_CMD_UPDATE_ARMOR_GROUPS, AO_CMD_UPDATE_POSITION, BS, clearChildAttachments(), clearParentAttachment(), ObjectProperties::collisionbox, createSmokePuff(), ObjectProperties::damage_texture_modifier, ObjectProperties::deSerialize(), deSerializeString16(), expireVisuals(), ObjectProperties::eye_height, FUNCTION_NAME, ClientEnvironment::getLocalPlayer(), getParent(), LocalPlayer::hp, infostream, SmoothTranslator< T >::init(), ObjectProperties::initial_sprite_basepos, LocalPlayer::last_animation, Player::local_animations, m_acceleration, m_anim_framelength, m_anim_num_frames, m_animation_blend, m_animation_loop, m_animation_range, m_animation_speed, m_armor_groups, m_bone_position, m_current_texture_modifier, ClientActiveObject::m_env, m_hp, m_initial_tx_basepos_set, m_is_local_player, m_is_player, m_name, m_position, m_previous_texture_modifier, m_prop, m_reset_textures_timer, m_rotation, m_selection_box, m_smgr, m_tx_basepos, m_tx_select_horiz_by_yawpitch, m_tx_size, m_velocity, LocalPlayer::makes_footstep_sound, ObjectProperties::makes_footstep_sound, ObjectProperties::nametag, NO_ANIM, p(), ObjectProperties::physical, LocalPlayer::physics_override_gravity, LocalPlayer::physics_override_jump, LocalPlayer::physics_override_new_move, LocalPlayer::physics_override_sneak, LocalPlayer::physics_override_sneak_glitch, LocalPlayer::physics_override_speed, pos_translator, readF32(), readS16(), readU16(), readU8(), readV2F32(), readV2S16(), readV3F32(), rot_translator, ObjectProperties::selectionbox, setAttachment(), LocalPlayer::setCollisionbox(), LocalPlayer::setEyeHeight(), LocalPlayer::setZoomFOV(), ObjectProperties::show_on_minimap, ObjectProperties::spritediv, ObjectProperties::textures, SmoothTranslator< T >::update(), updateAnimation(), updateAnimationSpeed(), updateMarker(), updateNametag(), updateNodePos(), updateTexturePos(), updateTextures(), ObjectProperties::visual_size, visualExpiryRequired(), warningstream, wrapDegrees_0_360_v3f(), and ObjectProperties::zoom_fov.

Referenced by processInitData().

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

◆ removeAttachmentChild()

void GenericCAO::removeAttachmentChild ( int  child_id)
virtual

Reimplemented from ActiveObject.

References m_attachment_child_ids.

Referenced by clearChildAttachments().

+ Here is the caller graph for this function:

◆ removeFromScene()

void GenericCAO::removeFromScene ( bool  permanent)
virtual

Reimplemented from ClientActiveObject.

References clearParentAttachment(), Client::getCamera(), Client::getMinimap(), m_animated_meshnode, m_client, ClientActiveObject::m_env, m_marker, m_matrixnode, m_meshnode, m_nametag, m_spritenode, m_wield_meshnode, Minimap::removeMarker(), and Camera::removeNametag().

Referenced by ~GenericCAO(), and step().

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

◆ setAttachment()

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

Reimplemented from ActiveObject.

References ActiveObject::addAttachmentChild(), CAMERA_MODE_FIRST, ClientEnvironment::getActiveObject(), Client::getCamera(), Camera::getCameraMode(), m_attached_to_local, m_attachment_bone, m_attachment_parent_id, m_attachment_position, m_attachment_rotation, m_client, ClientActiveObject::m_env, m_force_visible, ActiveObject::m_id, m_is_local_player, m_is_visible, ActiveObject::removeAttachmentChild(), and updateAttachments().

Referenced by clearParentAttachment(), and processMessage().

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

◆ setChildrenVisible()

void GenericCAO::setChildrenVisible ( bool  toset)

References ClientEnvironment::getGenericCAO(), m_attachment_child_ids, ClientActiveObject::m_env, m_force_visible, and setVisible().

Referenced by LuaCamera::l_set_camera_mode(), and Game::updateCamera().

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

◆ setNodeLight()

void GenericCAO::setNodeLight ( u8  light)

References getSceneNode(), m_animated_meshnode, m_enable_shaders, m_meshnode, m_prop, m_spritenode, m_wield_meshnode, setAnimatedMeshColor(), setMeshColor(), WieldMeshSceneNode::setNodeLightColor(), and ObjectProperties::visual.

Referenced by addToScene(), and updateLight().

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

◆ setPosition()

void GenericCAO::setPosition ( const v3f pos)
inline

◆ setVisible()

void GenericCAO::setVisible ( bool  toset)
inline

References m_is_visible.

Referenced by setChildrenVisible().

+ Here is the caller graph for this function:

◆ step()

void GenericCAO::step ( float  dtime,
ClientEnvironment env 
)
virtual

Reimplemented from ClientActiveObject.

References addToScene(), SmoothTranslator< T >::aim_is_end, SmoothTranslator< T >::anim_time, ObjectProperties::automatic_face_movement_dir, ObjectProperties::automatic_face_movement_dir_offset, ObjectProperties::automatic_face_movement_max_rotation_per_sec, ObjectProperties::automatic_rotate, PlayerControl::aux1, BS, Client::checkLocalPrivilege(), collisionMoveResult::collides, ObjectProperties::collideWithObjects, ObjectProperties::collisionbox, collisionMoveSimple(), PlayerControl::dig, DIG_ANIM, PlayerControl::down, floatToInt(), PlayerControl::forw_move_joystick_axis, g_settings, SimpleSoundSpec::gain, NodeDefManager::get(), ClientEnvironment::getActiveObject(), Settings::getBool(), ClientEnvironment::getGameDef(), ClientEnvironment::getLocalPlayer(), ClientEnvironment::getMap(), Map::getNode(), getParent(), Player::getPlayerControl(), getPosition(), LocalPlayer::getPosition(), ClientActiveObject::getSceneNode(), getSceneNode(), LocalPlayer::getYaw(), LocalPlayer::last_animation, LocalPlayer::last_animation_speed, PlayerControl::left, Player::local_animation_speed, Player::local_animations, m_acceleration, m_anim_frame, m_anim_framelength, m_anim_num_frames, m_anim_timer, m_animated_meshnode, m_animation_range, m_animation_speed, m_attachment_child_ids, m_client, ClientActiveObject::m_env, m_is_local_player, m_is_visible, m_matrixnode, m_position, m_previous_texture_modifier, m_prop, m_reset_textures_timer, m_rotation, m_smgr, m_step_distance_counter, m_velocity, m_visuals_expired, ObjectProperties::makes_footstep_sound, modulo360f(), IGameDef::ndef(), NO_ANIM, p(), ObjectProperties::physical, PlayerControl::place, ISoundManager::playSoundAt(), pos_translator, removeFromScene(), PlayerControl::right, rot_translator, PlayerControl::sidew_move_joystick_axis, PlayerControl::sneak, Client::sound(), ContentFeatures::sound_footstep, ObjectProperties::stepheight, LocalPlayer::touching_ground, SmoothTranslator< T >::translate(), SmoothTranslatorWrappedv3f::translate(), Client::tsrc(), PlayerControl::up, SmoothTranslator< T >::update(), updateAnimation(), ClientActiveObject::updateAttachments(), updateBonePosition(), updateNodePos(), updatePositionRecursive(), updateTexturePos(), updateTextures(), SmoothTranslator< T >::val_current, SmoothTranslator< T >::val_target, WALK_ANIM, WD_ANIM, wrapDegrees_0_360(), and wrappedApproachShortest().

+ Here is the call graph for this function:

◆ updateAnimation()

void GenericCAO::updateAnimation ( )

References m_animated_meshnode, m_animation_blend, m_animation_loop, m_animation_range, and m_animation_speed.

Referenced by addToScene(), processMessage(), and step().

+ Here is the caller graph for this function:

◆ updateAnimationSpeed()

void GenericCAO::updateAnimationSpeed ( )

References m_animated_meshnode, and m_animation_speed.

Referenced by processMessage().

+ Here is the caller graph for this function:

◆ updateAttachments()

void GenericCAO::updateAttachments ( )
virtual

Reimplemented from ClientActiveObject.

References BS, ClientActiveObject::getAnimatedMeshSceneNode(), ClientEnvironment::getCameraOffset(), getParent(), getPosition(), getPosRotMatrix(), ClientActiveObject::getSceneNode(), intToFloat(), ClientActiveObject::isLocalPlayer(), m_attached_to_local, m_attachment_bone, m_attachment_position, m_attachment_rotation, ClientActiveObject::m_env, m_matrixnode, m_smgr, and ClientActiveObject::updateAttachments().

Referenced by addToScene(), and setAttachment().

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

◆ updateBonePosition()

void GenericCAO::updateBonePosition ( )

References m_animated_meshnode, and m_bone_position.

Referenced by addToScene(), and step().

+ Here is the caller graph for this function:

◆ updateLight()

void GenericCAO::updateLight ( u32  day_night_ratio)
virtual

Reimplemented from ClientActiveObject.

References blend_light(), decode_light(), MapNode::getLightBlend(), getLightPosition(), ClientEnvironment::getMap(), Map::getNode(), LIGHT_SUN, m_client, ClientActiveObject::m_env, m_glow, m_last_light, MYMAX, IGameDef::ndef(), and setNodeLight().

+ Here is the call graph for this function:

◆ updateMarker()

void GenericCAO::updateMarker ( )

References Minimap::addMarker(), Client::getMinimap(), getSceneNode(), m_client, m_marker, m_prop, Minimap::removeMarker(), and ObjectProperties::show_on_minimap.

Referenced by addToScene(), and processMessage().

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

◆ updateMeshCulling()

void GenericCAO::updateMeshCulling ( )

References ObjectProperties::backface_culling, CAMERA_MODE_FIRST, Client::getCamera(), Camera::getCameraMode(), getSceneNode(), m_client, m_is_local_player, m_meshnode, m_prop, and ObjectProperties::visual.

Referenced by addToScene(), LuaCamera::l_set_camera_mode(), Game::updateCamera(), and updateTextures().

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

◆ updateNametag()

void GenericCAO::updateNametag ( )

References Camera::addNametag(), Nametag::bgcolor, Client::getCamera(), getSceneNode(), m_client, m_is_local_player, m_nametag, m_prop, ObjectProperties::nametag, ObjectProperties::nametag_bgcolor, ObjectProperties::nametag_color, Nametag::pos, Camera::removeNametag(), ObjectProperties::selectionbox, Nametag::text, and Nametag::textcolor.

Referenced by addToScene(), and processMessage().

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

◆ updateNodePos()

void GenericCAO::updateNodePos ( )

References BS, ClientEnvironment::getCameraOffset(), getParent(), getPosRotMatrix(), getSceneNode(), intToFloat(), ClientActiveObject::m_env, m_is_local_player, m_rotation, m_spritenode, pos_translator, rot_translator, setPitchYawRoll(), and SmoothTranslator< T >::val_current.

Referenced by addToScene(), processInitData(), processMessage(), and step().

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

◆ updateTexturePos()

void GenericCAO::updateTexturePos ( )

References dir(), m_anim_frame, m_meshnode, m_prop, m_rotation, m_spritenode, m_tx_basepos, m_tx_select_horiz_by_yawpitch, m_tx_size, setBillboardTextureMatrix(), setMeshBufferTextureCoords(), ObjectProperties::visual, and wrapDegrees_180().

Referenced by processMessage(), and step().

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

◆ updateTextures()

void GenericCAO::updateTextures ( std::string  mod)

References ObjectProperties::backface_culling, ObjectProperties::colors, errorstream, g_settings, Settings::getBool(), ITextureSource::getTextureForMesh(), ObjectProperties::glow, m_animated_meshnode, m_client, m_current_texture_modifier, m_glow, m_is_local_player, m_material_type, m_meshnode, m_previous_texture_modifier, m_prop, m_spritenode, setMeshColor(), ObjectProperties::textures, Client::tsrc(), updateMeshCulling(), and ObjectProperties::visual.

Referenced by addToScene(), directReportPunch(), processMessage(), and step().

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

◆ visualExpiryRequired()

bool GenericCAO::visualExpiryRequired ( const ObjectProperties newprops) const
private

Member Data Documentation

◆ m_acceleration

v3f GenericCAO::m_acceleration
private

Referenced by processMessage(), and step().

◆ m_anim_frame

int GenericCAO::m_anim_frame = 0
private

Referenced by step(), and updateTexturePos().

◆ m_anim_framelength

float GenericCAO::m_anim_framelength = 0.2f
private

Referenced by processMessage(), and step().

◆ m_anim_num_frames

int GenericCAO::m_anim_num_frames = 1
private

Referenced by processMessage(), and step().

◆ m_anim_timer

float GenericCAO::m_anim_timer = 0.0f
private

Referenced by step().

◆ m_animated_meshnode

scene::IAnimatedMeshSceneNode* GenericCAO::m_animated_meshnode = nullptr
private

◆ m_animation_blend

float GenericCAO::m_animation_blend = 0.0f
private

Referenced by processMessage(), and updateAnimation().

◆ m_animation_loop

bool GenericCAO::m_animation_loop = true
private

Referenced by processMessage(), and updateAnimation().

◆ m_animation_range

v2s32 GenericCAO::m_animation_range
private

◆ m_animation_speed

float GenericCAO::m_animation_speed = 15.0f
private

◆ m_armor_groups

ItemGroupList GenericCAO::m_armor_groups
private

◆ m_attached_to_local

bool GenericCAO::m_attached_to_local = false
private

Referenced by setAttachment(), and updateAttachments().

◆ m_attachment_bone

std::string GenericCAO::m_attachment_bone = ""
private

◆ m_attachment_child_ids

std::unordered_set<int> GenericCAO::m_attachment_child_ids
private

◆ m_attachment_parent_id

int GenericCAO::m_attachment_parent_id = 0
private

◆ m_attachment_position

v3f GenericCAO::m_attachment_position
private

◆ m_attachment_rotation

v3f GenericCAO::m_attachment_rotation
private

◆ m_bone_position

std::unordered_map<std::string, core::vector2d<v3f> > GenericCAO::m_bone_position
private

◆ m_client

◆ m_current_texture_modifier

std::string GenericCAO::m_current_texture_modifier = ""
private

◆ m_enable_shaders

bool GenericCAO::m_enable_shaders = false
private

◆ m_force_visible

bool GenericCAO::m_force_visible = false
private

◆ m_glow

s8 GenericCAO::m_glow = 0
private

Referenced by updateLight(), and updateTextures().

◆ m_hp

u16 GenericCAO::m_hp = 1
private

◆ m_initial_tx_basepos_set

bool GenericCAO::m_initial_tx_basepos_set = false
private

Referenced by processMessage().

◆ m_is_local_player

◆ m_is_player

bool GenericCAO::m_is_player = false
private

◆ m_is_visible

bool GenericCAO::m_is_visible = false
private

◆ m_last_light

u8 GenericCAO::m_last_light = 255
private

Referenced by addToScene(), and updateLight().

◆ m_marker

MinimapMarker* GenericCAO::m_marker = nullptr
private

Referenced by removeFromScene(), and updateMarker().

◆ m_material_type

video::E_MATERIAL_TYPE GenericCAO::m_material_type
private

Referenced by addToScene(), and updateTextures().

◆ m_matrixnode

scene::IDummyTransformationSceneNode* GenericCAO::m_matrixnode = nullptr
private

◆ m_meshnode

scene::IMeshSceneNode* GenericCAO::m_meshnode = nullptr
private

◆ m_name

std::string GenericCAO::m_name = ""
private

◆ m_nametag

Nametag* GenericCAO::m_nametag = nullptr
private

Referenced by removeFromScene(), and updateNametag().

◆ m_position

v3f GenericCAO::m_position = v3f(0.0f, 10.0f * BS, 0)
private

◆ m_previous_texture_modifier

std::string GenericCAO::m_previous_texture_modifier = ""
private

◆ m_prop

◆ m_reset_textures_timer

float GenericCAO::m_reset_textures_timer = -1.0f
private

◆ m_rotation

v3f GenericCAO::m_rotation
private

◆ m_selection_box

aabb3f GenericCAO::m_selection_box = aabb3f(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.)
private

Referenced by getSelectionBox(), and processMessage().

◆ m_smgr

scene::ISceneManager* GenericCAO::m_smgr = nullptr
private

◆ m_spritenode

scene::IBillboardSceneNode* GenericCAO::m_spritenode = nullptr
private

◆ m_step_distance_counter

float GenericCAO::m_step_distance_counter = 0.0f
private

Referenced by step().

◆ m_tx_basepos

v2s16 GenericCAO::m_tx_basepos
private

Referenced by processMessage(), and updateTexturePos().

◆ m_tx_select_horiz_by_yawpitch

bool GenericCAO::m_tx_select_horiz_by_yawpitch = false
private

Referenced by processMessage(), and updateTexturePos().

◆ m_tx_size

v2f GenericCAO::m_tx_size = v2f(1,1)
private

Referenced by processMessage(), and updateTexturePos().

◆ m_velocity

v3f GenericCAO::m_velocity
private

Referenced by processMessage(), and step().

◆ m_visuals_expired

bool GenericCAO::m_visuals_expired = false
private

Referenced by addToScene(), expireVisuals(), and step().

◆ m_wield_meshnode

WieldMeshSceneNode* GenericCAO::m_wield_meshnode = nullptr
private

◆ pos_translator

SmoothTranslator<v3f> GenericCAO::pos_translator
private

◆ rot_translator

SmoothTranslatorWrappedv3f GenericCAO::rot_translator
private

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