Luanti 5.16.0-dev
Loading...
Searching...
No Matches
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 override
const ItemGroupListgetGroups () const
void initialize (const std::string &data) override
void processInitData (const std::string &data)
bool getCollisionBox (aabb3f *toset) const override
bool collideWithObjects () const override
virtual bool getSelectionBox (aabb3f *toset) const override
const v3f getPosition () const override final
const v3f getVelocity () const override final
const v3fgetRotation () const
bool isImmortal () const
const ObjectPropertiesgetProperties () const
const std::string & getName () const
scene::ISceneNode * getSceneNode () const override
scene::AnimatedMeshSceneNode * getAnimatedMeshSceneNode () const override
core::matrix4 & getPosRotMatrix ()
const core::matrix4 * getAbsolutePosRotMatrix () const
f32 getStepHeight () const
bool isLocalPlayer () const override
bool isPlayer () const
bool isVisible () const
void setVisible (bool toset)
void setChildrenVisible (bool toset)
void setAttachment (object_t parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible) override
void getAttachment (object_t *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const override
void clearChildAttachments () override
void addAttachmentChild (object_t child_id) override
void removeAttachmentChild (object_t child_id) override
ClientActiveObjectgetParent () const override
const std::unordered_set< object_t > & getAttachmentChildIds () const override
void updateAttachments () override
void removeFromScene (bool permanent) override
void addToScene (ITextureSource *tsrc, scene::ISceneManager *smgr) override
void expireVisuals ()
void updateLight (u32 day_night_ratio) override
void setNodeLight (const video::SColor &light)
u16 getLightPosition (v3s16 *pos)
void updateNametag ()
void updateMarker ()
void updateNodePos ()
void step (float dtime, ClientEnvironment *env) override
void updateTextureAnim ()
void updateTextures (std::string mod)
void updateAnimation ()
void updateAnimationSpeed ()
void processMessage (const std::string &data) override
bool directReportPunch (v3f dir, const ItemStack *punchitem, const ItemStack *hand_item, float time_from_last_punch=1000000) override
std::string debugInfoText () override
std::string infoText () override
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 (object_t id)
object_t getId () const
void setId (object_t id)
virtual void clearParentAttachment ()

Static Public Member Functions

static std::unique_ptr< ClientActiveObjectcreate (Client *client, ClientEnvironment *env)
Static Public Member Functions inherited from ClientActiveObject
static std::unique_ptr< ClientActiveObjectcreate (ActiveObjectType type, Client *client, ClientEnvironment *env)

Private Member Functions

bool visualExpiryRequired (const ObjectProperties &newprops) const
void updateParentChain () const
 Update the parent chain so getPosition() returns an up to date position.

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::AnimatedMeshSceneNode * m_animated_meshnode = nullptr
WieldMeshSceneNodem_wield_meshnode = nullptr
scene::IBillboardSceneNode * m_spritenode = nullptr
scene::IDummyTransformationSceneNode * m_matrixnode = nullptr
Nametagm_nametag = nullptr
MinimapMarkerm_marker = nullptr
bool m_visuals_expired = false
video::SColor m_last_light = video::SColor(0xFFFFFFFF)
bool m_is_visible = false
std::vector< MeshAnimationInfom_meshnode_animation
video::E_MATERIAL_TYPE m_material_type = video::EMT_INVALID
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
bool m_animation_loop = true
v2f m_animation_range
float m_animation_speed = 15.0f
float m_animation_blend = 0.0f
int m_anim_frame = 0
int m_anim_num_frames = 1
float m_anim_framelength = 0.2f
float m_anim_timer = 0.0f
BoneOverrideMap m_bone_override
object_t m_attachment_parent_id = 0
std::unordered_set< object_tm_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
ItemGroupList m_armor_groups
float m_reset_textures_timer = -1.0f
std::string m_previous_texture_modifier = ""
std::string m_current_texture_modifier = ""
float m_step_distance_counter = 0.0f

Additional Inherited Members

Public Types inherited from ActiveObject
typedef u16 object_t
Protected Types inherited from ClientActiveObject
typedef std::unique_ptr< 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
object_t m_id

Constructor & Destructor Documentation

◆ GenericCAO()

GenericCAO::GenericCAO ( Client * client,
ClientEnvironment * env )

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

Referenced by setChildrenVisible().

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 ( object_t child_id)
overridevirtual

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,
scene::ISceneManager * smgr )
overridevirtual

Implements ClientActiveObject.

References BS, checkMeshNormals(), createCubeMesh(), ItemStack::deSerialize(), BoneOverride::dtime_passed, enum_to_string(), errorstream, es_ObjectVisual, generateNodeMesh(), RenderingEngine::get_shadow_renderer(), BoneOverride::getPosition(), BoneOverride::getRotationEulerDeg(), BoneOverride::getScale(), getSceneNode(), IShaderSource::getShader(), IShaderSource::getShaderInfo(), ITextureSource::getTextureForMesh(), infostream, BoneOverride::isIdentity(), logOnce(), m_animated_meshnode, m_bone_override, m_client, m_current_texture_modifier, m_is_player, m_last_light, m_material_type, m_matrixnode, m_meshnode, m_meshnode_animation, m_prop, m_reset_textures_timer, m_smgr, m_spritenode, m_visuals_expired, m_wield_meshnode, ShaderInfo::material, NDT_NORMAL, OBJECTVISUAL_CUBE, OBJECTVISUAL_ITEM, OBJECTVISUAL_MESH, OBJECTVISUAL_NODE, OBJECTVISUAL_SPRITE, OBJECTVISUAL_UPRIGHT_SPRITE, OBJECTVISUAL_WIELDITEM, setBillboardTextureMatrix(), setMeshColor(), setNodeLight(), TILE_MATERIAL_ALPHA, TILE_MATERIAL_BASIC, TILE_MATERIAL_PLAIN, TILE_MATERIAL_PLAIN_ALPHA, updateAnimation(), updateAttachments(), updateMarker(), updateMeshCulling(), updateNametag(), updateNodePos(), updateTextures(), and warningstream.

Referenced by step().

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

◆ clearChildAttachments()

void GenericCAO::clearChildAttachments ( )
overridevirtual

Reimplemented from ActiveObject.

References 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:

◆ collideWithObjects()

bool GenericCAO::collideWithObjects ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

References m_prop.

◆ create()

std::unique_ptr< ClientActiveObject > GenericCAO::create ( Client * client,
ClientEnvironment * env )
inlinestatic

Referenced by GenericCAO().

Here is the caller graph for this function:

◆ debugInfoText()

std::string GenericCAO::debugInfoText ( )
overridevirtual

Reimplemented from ClientActiveObject.

References m_armor_groups, and m_hp.

◆ directReportPunch()

bool GenericCAO::directReportPunch ( v3f dir,
const ItemStack * punchitem,
const ItemStack * hand_item,
float time_from_last_punch = 1000000 )
overridevirtual

Reimplemented from ClientActiveObject.

References BS, createSmokePuff(), PunchDamageResult::damage, PunchDamageResult::did_punch, dir(), getPunchDamage(), ItemStack::getToolCapabilities(), m_armor_groups, m_client, m_current_texture_modifier, ClientActiveObject::m_env, m_hp, m_position, m_prop, m_reset_textures_timer, m_smgr, updateTextures(), and ItemStack::wear.

Here is the call graph for this function:

◆ 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::AnimatedMeshSceneNode * GenericCAO::getAnimatedMeshSceneNode ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

References m_animated_meshnode.

◆ getAttachment()

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

◆ getAttachmentChildIds()

const std::unordered_set< object_t > & GenericCAO::getAttachmentChildIds ( ) const
inlineoverridevirtual

Reimplemented from ClientActiveObject.

References m_attachment_child_ids.

◆ getCollisionBox()

bool GenericCAO::getCollisionBox ( aabb3f * toset) const
overridevirtual

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, m_position, and m_prop.

◆ getGroups()

const ItemGroupList & GenericCAO::getGroups ( ) const
inline

References m_armor_groups.

Referenced by ClientEnvironment::getSelectedActiveObjects(), isImmortal(), LuaLocalPlayer::l_get_armor_groups(), and ClientEnvironment::step().

Here is the caller graph for this function:

◆ getLightPosition()

u16 GenericCAO::getLightPosition ( v3s16 * pos)

References BS, 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:

◆ getName()

const std::string & GenericCAO::getName ( ) const
inline

References m_name.

Referenced by ClientEnvironment::getSelectedActiveObjects().

Here is the caller graph for this function:

◆ getParent()

ClientActiveObject * GenericCAO::getParent ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

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

Referenced by 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
finaloverridevirtual

Reimplemented from ClientActiveObject.

References BS, getParent(), intToFloat(), ClientActiveObject::m_env, m_matrixnode, m_position, pos_translator, and updateParentChain().

Referenced by 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:

◆ getProperties()

const ObjectProperties & GenericCAO::getProperties ( ) const
inline

References m_prop.

Referenced by ClientEnvironment::getSelectedActiveObjects(), Game::handleClientEvent_PlayerDamage(), and Game::updatePointedThing().

Here is the caller graph for this function:

◆ getRotation()

const v3f & GenericCAO::getRotation ( ) const
inline

References m_rotation.

◆ getSceneNode()

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

Reimplemented from ClientActiveObject.

References m_animated_meshnode, m_meshnode, m_spritenode, and m_wield_meshnode.

Referenced by addToScene(), ClientEnvironment::getSelectedActiveObjects(), removeFromScene(), setNodeLight(), step(), updateMarker(), updateMeshCulling(), updateNametag(), updateNodePos(), and Game::updatePointedThing().

Here is the caller graph for this function:

◆ getSelectionBox()

bool GenericCAO::getSelectionBox ( aabb3f * toset) const
overridevirtual

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 m_is_local_player, m_is_visible, m_prop, and m_selection_box.

◆ getStepHeight()

f32 GenericCAO::getStepHeight ( ) const
inline

References m_prop.

Referenced by Camera::update().

Here is the caller graph for this function:

◆ getType()

ActiveObjectType GenericCAO::getType ( ) const
inlineoverridevirtual

Implements ActiveObject.

References ACTIVEOBJECT_TYPE_GENERIC.

Referenced by GenericCAO().

Here is the caller graph for this function:

◆ getVelocity()

const v3f GenericCAO::getVelocity ( ) const
inlinefinaloverridevirtual

Reimplemented from ClientActiveObject.

References getVelocity(), and m_velocity.

Referenced by getVelocity().

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

◆ infoText()

std::string GenericCAO::infoText ( )
inlineoverridevirtual

Reimplemented from ClientActiveObject.

References m_prop.

◆ initialize()

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

Reimplemented from ClientActiveObject.

References processInitData().

Here is the call graph for this function:

◆ isImmortal()

bool GenericCAO::isImmortal ( ) const

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
inlineoverridevirtual

Reimplemented from ClientActiveObject.

References m_is_local_player.

◆ isPlayer()

bool GenericCAO::isPlayer ( ) const
inline

References m_is_player.

Referenced by ClientEnvironment::getSelectedActiveObjects().

Here is the caller graph for this function:

◆ isVisible()

bool GenericCAO::isVisible ( ) const
inline

References m_is_visible.

◆ processInitData()

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

References deSerializeString16(), deSerializeString32(), errorstream, Player::getName(), ClientActiveObject::m_env, m_hp, ActiveObject::m_id, m_is_local_player, m_is_player, m_is_visible, m_name, m_position, m_rotation, pos_translator, processMessage(), readU16(), readU8(), readV3F32(), rot_translator, LocalPlayer::setCAO(), 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)
overridevirtual

Reimplemented from ClientActiveObject.

References BoneOverride::PositionProperty::absolute, BoneOverride::RotationProperty::absolute, BoneOverride::ScaleProperty::absolute, PlayerPhysicsOverride::acceleration_air, PlayerPhysicsOverride::acceleration_default, PlayerPhysicsOverride::acceleration_fast, addAttachmentChild(), 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, canRead(), clearChildAttachments(), ActiveObject::clearParentAttachment(), createSmokePuff(), ObjectProperties::deSerialize(), deSerializeString16(), BoneOverride::dtime_passed, expireVisuals(), FUNCTION_NAME, getParent(), PlayerPhysicsOverride::gravity, BoneOverride::PositionProperty::interp_duration, BoneOverride::RotationProperty::interp_duration, BoneOverride::ScaleProperty::interp_duration, PlayerPhysicsOverride::jump, LocalPlayer::last_animation, PlayerPhysicsOverride::liquid_fluidity, PlayerPhysicsOverride::liquid_fluidity_smooth, PlayerPhysicsOverride::liquid_sink, Player::local_animations, m_acceleration, m_anim_frame, m_anim_framelength, m_anim_num_frames, m_animation_blend, m_animation_loop, m_animation_range, m_animation_speed, m_armor_groups, m_bone_override, 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, PlayerPhysicsOverride::new_move, BoneOverride::RotationProperty::next, NO_ANIM, p(), pos_translator, BoneOverride::position, BoneOverride::PositionProperty::previous, BoneOverride::RotationProperty::previous, BoneOverride::ScaleProperty::previous, readF32(), readS16(), readU16(), readU8(), readV2F32(), readV2S16(), readV3F32(), rot_translator, BoneOverride::rotation, BoneOverride::scale, setAttachment(), LocalPlayer::setCollisionbox(), LocalPlayer::setEyeHeight(), LocalPlayer::setZoomFOV(), ObjectProperties::show_on_minimap, PlayerPhysicsOverride::sneak, PlayerPhysicsOverride::sneak_glitch, PlayerPhysicsOverride::speed, PlayerPhysicsOverride::speed_climb, PlayerPhysicsOverride::speed_crouch, PlayerPhysicsOverride::speed_fast, PlayerPhysicsOverride::speed_walk, ObjectProperties::textures, updateAnimation(), updateAnimationSpeed(), updateMarker(), updateNametag(), updateNodePos(), updateTextureAnim(), updateTextures(), BoneOverride::PositionProperty::vector, BoneOverride::ScaleProperty::vector, visualExpiryRequired(), warningstream, and wrapDegrees_0_360_v3f().

Referenced by processInitData().

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

◆ removeAttachmentChild()

void GenericCAO::removeAttachmentChild ( object_t child_id)
overridevirtual

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)
overridevirtual

Reimplemented from ClientActiveObject.

References ActiveObject::clearParentAttachment(), RenderingEngine::get_shadow_renderer(), getSceneNode(), m_animated_meshnode, m_client, ClientActiveObject::m_env, m_marker, m_matrixnode, m_meshnode, m_meshnode_animation, m_nametag, m_spritenode, and m_wield_meshnode.

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 ( object_t parent_id,
const std::string & bone,
v3f position,
v3f rotation,
bool force_visible )
overridevirtual

Reimplemented from ActiveObject.

References ClientActiveObject::ClientActiveObject(), ActiveObject::addAttachmentChild(), CAMERA_MODE_FIRST, 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, updateAttachments(), and warningstream.

Referenced by processMessage().

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

◆ setChildrenVisible()

void GenericCAO::setChildrenVisible ( bool toset)

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

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

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

◆ setNodeLight()

void GenericCAO::setNodeLight ( const video::SColor & light)

References getSceneNode(), m_client, m_prop, m_wield_meshnode, OBJECTVISUAL_ITEM, OBJECTVISUAL_WIELDITEM, and setColorParam().

Referenced by addToScene(), and updateLight().

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

◆ 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 )
overridevirtual

◆ 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 ( )
overridevirtual

Reimplemented from ClientActiveObject.

References ClientActiveObject::ClientActiveObject(), BS, ClientActiveObject::getAnimatedMeshSceneNode(), 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:

◆ updateLight()

void GenericCAO::updateLight ( u32 day_night_ratio)
overridevirtual

Reimplemented from ClientActiveObject.

References encode_light(), getInteriorLight(), getLightPosition(), LIGHT_SUN, m_client, ClientActiveObject::m_env, m_last_light, m_prop, MYMAX, and setNodeLight().

Here is the call graph for this function:

◆ updateMarker()

void GenericCAO::updateMarker ( )

References getSceneNode(), m_client, m_marker, and m_prop.

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 CAMERA_MODE_FIRST, getSceneNode(), m_client, m_is_local_player, m_prop, and OBJECTVISUAL_UPRIGHT_SPRITE.

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

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

◆ updateNametag()

void GenericCAO::updateNametag ( )

References getSceneNode(), m_client, m_is_local_player, m_nametag, and m_prop.

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, getParent(), getPosRotMatrix(), getSceneNode(), intToFloat(), ClientActiveObject::m_env, m_is_local_player, m_matrixnode, m_rotation, m_spritenode, pos_translator, rot_translator, and setPitchYawRoll().

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

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

◆ updateParentChain()

void GenericCAO::updateParentChain ( ) const
private

Update the parent chain so getPosition() returns an up to date position.

References m_matrixnode.

Referenced by getPosition().

Here is the caller graph for this function:

◆ updateTextureAnim()

void GenericCAO::updateTextureAnim ( )

References TileLayer::animation_frame_count, TileLayer::animation_frame_length_ms, dir(), TileLayer::frames, m_anim_frame, m_client, m_meshnode, m_meshnode_animation, m_prop, m_rotation, m_spritenode, m_tx_basepos, m_tx_select_horiz_by_yawpitch, m_tx_size, OBJECTVISUAL_NODE, OBJECTVISUAL_UPRIGHT_SPRITE, setBillboardTextureMatrix(), setMeshBufferTextureCoords(), FrameSpec::texture, 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 m_animated_meshnode, m_client, m_current_texture_modifier, m_is_local_player, m_material_type, m_meshnode, m_previous_texture_modifier, m_prop, m_spritenode, OBJECTVISUAL_CUBE, OBJECTVISUAL_MESH, OBJECTVISUAL_SPRITE, OBJECTVISUAL_UPRIGHT_SPRITE, setMaterialTextureAndFilters(), setMeshColor(), and updateMeshCulling().

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

◆ 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::AnimatedMeshSceneNode* 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

v2f 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<object_t> GenericCAO::m_attachment_child_ids
private

◆ m_attachment_parent_id

object_t 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_override

BoneOverrideMap GenericCAO::m_bone_override
private

Referenced by addToScene(), and processMessage().

◆ m_client

◆ m_current_texture_modifier

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

◆ m_force_visible

bool GenericCAO::m_force_visible = false
private

◆ 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

video::SColor GenericCAO::m_last_light = video::SColor(0xFFFFFFFF)
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 = video::EMT_INVALID
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_meshnode_animation

std::vector<MeshAnimationInfo> GenericCAO::m_meshnode_animation
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

◆ m_tx_select_horiz_by_yawpitch

bool GenericCAO::m_tx_select_horiz_by_yawpitch = false
private

◆ m_tx_size

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

◆ m_velocity

v3f GenericCAO::m_velocity
private

Referenced by getVelocity(), 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: