Minetest  5.4.0
MapBlockMesh Class Reference

#include <mapblock_mesh.h>

+ Collaboration diagram for MapBlockMesh:

Public Member Functions

 MapBlockMesh (MeshMakeData *data, v3s16 camera_offset)
 
 ~MapBlockMesh ()
 
bool animate (bool faraway, float time, int crack, u32 daynight_ratio)
 
scene::IMesh * getMesh ()
 
scene::IMesh * getMesh (u8 layer)
 
MinimapMapblockmoveMinimapMapblock ()
 
bool isAnimationForced () const
 
void decreaseAnimationForceTimer ()
 

Private Attributes

scene::IMesh * m_mesh [MAX_TILE_LAYERS]
 
MinimapMapblockm_minimap_mapblock
 
ITextureSourcem_tsrc
 
IShaderSourcem_shdrsrc
 
bool m_enable_shaders
 
bool m_enable_vbo
 
bool m_has_animation
 
int m_animation_force_timer
 
int m_last_crack
 
std::map< std::pair< u8, u32 >, std::string > m_crack_materials
 
std::map< std::pair< u8, u32 >, TileLayerm_animation_tiles
 
std::map< std::pair< u8, u32 >, int > m_animation_frames
 
std::map< std::pair< u8, u32 >, int > m_animation_frame_offsets
 
u32 m_last_daynight_ratio
 
std::map< std::pair< u8, u32 >, std::map< u32, video::SColor > > m_daynight_diffs
 

Constructor & Destructor Documentation

◆ MapBlockMesh()

◆ ~MapBlockMesh()

MapBlockMesh::~MapBlockMesh ( )

References RenderingEngine::get_video_driver(), m_enable_vbo, m_mesh, and m_minimap_mapblock.

+ Here is the call graph for this function:

Member Function Documentation

◆ animate()

bool MapBlockMesh::animate ( bool  faraway,
float  time,
int  crack,
u32  daynight_ratio 
)

References TileLayer::animation_frame_count, TileLayer::animation_frame_length_ms, final_color_blend(), FrameSpec::flags_texture, TileLayer::frames, get_sunlight_color(), ITextureSource::getTextureForMesh(), m_animation_force_timer, m_animation_frame_offsets, m_animation_frames, m_animation_tiles, m_crack_materials, m_daynight_diffs, m_enable_shaders, m_enable_vbo, m_has_animation, m_last_crack, m_last_daynight_ratio, m_mesh, m_tsrc, myrand_range(), FrameSpec::normal_texture, FrameSpec::texture, TileLayer::texture, and TileLayer::texture_id.

Referenced by ClientMap::renderMap().

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

◆ decreaseAnimationForceTimer()

void MapBlockMesh::decreaseAnimationForceTimer ( )
inline

References m_animation_force_timer.

Referenced by ClientMap::renderMap().

+ Here is the caller graph for this function:

◆ getMesh() [1/2]

scene::IMesh* MapBlockMesh::getMesh ( )
inline

References m_mesh.

Referenced by ClientMap::renderMap(), and Client::step().

+ Here is the caller graph for this function:

◆ getMesh() [2/2]

scene::IMesh* MapBlockMesh::getMesh ( u8  layer)
inline

References m_mesh.

◆ isAnimationForced()

bool MapBlockMesh::isAnimationForced ( ) const
inline

References m_animation_force_timer.

Referenced by ClientMap::renderMap().

+ Here is the caller graph for this function:

◆ moveMinimapMapblock()

MinimapMapblock* MapBlockMesh::moveMinimapMapblock ( )
inline

References m_minimap_mapblock, and p().

Referenced by Client::step().

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

Member Data Documentation

◆ m_animation_force_timer

int MapBlockMesh::m_animation_force_timer
private

◆ m_animation_frame_offsets

std::map<std::pair<u8, u32>, int> MapBlockMesh::m_animation_frame_offsets
private

Referenced by MapBlockMesh(), and animate().

◆ m_animation_frames

std::map<std::pair<u8, u32>, int> MapBlockMesh::m_animation_frames
private

Referenced by MapBlockMesh(), and animate().

◆ m_animation_tiles

std::map<std::pair<u8, u32>, TileLayer> MapBlockMesh::m_animation_tiles
private

Referenced by MapBlockMesh(), and animate().

◆ m_crack_materials

std::map<std::pair<u8, u32>, std::string> MapBlockMesh::m_crack_materials
private

Referenced by MapBlockMesh(), and animate().

◆ m_daynight_diffs

std::map<std::pair<u8, u32>, std::map<u32, video::SColor > > MapBlockMesh::m_daynight_diffs
private

Referenced by MapBlockMesh(), and animate().

◆ m_enable_shaders

bool MapBlockMesh::m_enable_shaders
private

Referenced by MapBlockMesh(), and animate().

◆ m_enable_vbo

bool MapBlockMesh::m_enable_vbo
private

◆ m_has_animation

bool MapBlockMesh::m_has_animation
private

Referenced by MapBlockMesh(), and animate().

◆ m_last_crack

int MapBlockMesh::m_last_crack
private

Referenced by animate().

◆ m_last_daynight_ratio

u32 MapBlockMesh::m_last_daynight_ratio
private

Referenced by animate().

◆ m_mesh

scene::IMesh* MapBlockMesh::m_mesh[MAX_TILE_LAYERS]
private

◆ m_minimap_mapblock

MinimapMapblock* MapBlockMesh::m_minimap_mapblock
private

◆ m_shdrsrc

IShaderSource* MapBlockMesh::m_shdrsrc
private

Referenced by MapBlockMesh().

◆ m_tsrc

ITextureSource* MapBlockMesh::m_tsrc
private

Referenced by MapBlockMesh(), and animate().


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