Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
AnimationInfo Struct Reference

#include <tile.h>

+ Collaboration diagram for AnimationInfo:

Public Member Functions

 AnimationInfo ()=default
 
 AnimationInfo (const TileLayer &tile)
 
 AnimationInfo (std::vector< FrameSpec > *frames, u16 frame_length_ms)
 
size_t getFrameCount () const
 
void updateTexture (video::SMaterial &material, float animation_time)
 
video::ITexture * getTexture (float animation_time) const
 

Private Attributes

u16 m_frame_length_ms = 0
 
u16 m_frame_count = 1
 
std::vector< FrameSpec > * m_frames = nullptr
 

Constructor & Destructor Documentation

◆ AnimationInfo() [1/3]

AnimationInfo::AnimationInfo ( )
default

◆ AnimationInfo() [2/3]

AnimationInfo::AnimationInfo ( const TileLayer & tile)
inline

◆ AnimationInfo() [3/3]

AnimationInfo::AnimationInfo ( std::vector< FrameSpec > * frames,
u16 frame_length_ms )
inline

Member Function Documentation

◆ getFrameCount()

size_t AnimationInfo::getFrameCount ( ) const
inline

References m_frame_count, and m_frames.

Referenced by ItemVisualsManager::getInventoryAnimation(), ItemVisualsManager::getInventoryOverlayAnimation(), and getTexture().

+ Here is the caller graph for this function:

◆ getTexture()

video::ITexture * AnimationInfo::getTexture ( float animation_time) const

References getFrameCount(), m_frame_count, m_frame_length_ms, and m_frames.

Referenced by createItemMesh(), ItemVisualsManager::getInventoryOverlayTexture(), ItemVisualsManager::getInventoryTexture(), and updateTexture().

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

◆ updateTexture()

void AnimationInfo::updateTexture ( video::SMaterial & material,
float animation_time )

References getTexture().

Referenced by WieldMeshSceneNode::setLightColorAndAnimation().

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

Member Data Documentation

◆ m_frame_count

u16 AnimationInfo::m_frame_count = 1
private

Referenced by getFrameCount(), and getTexture().

◆ m_frame_length_ms

u16 AnimationInfo::m_frame_length_ms = 0
private

Referenced by getTexture().

◆ m_frames

std::vector<FrameSpec>* AnimationInfo::m_frames = nullptr
private
Note
by default not owned by this struct

Referenced by getFrameCount(), and getTexture().


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