#include <mapblock_mesh.h>
|
| MapBlockMesh (Client *client, 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) |
|
std::vector< MinimapMapblock * > | moveMinimapMapblocks () |
|
bool | isAnimationForced () const |
|
void | decreaseAnimationForceTimer () |
|
f32 | getBoundingRadius () const |
| Radius of the bounding-sphere, in BS-space.
|
|
v3f | getBoundingSphereCenter () const |
| Center of the bounding-sphere, in BS-space, relative to block pos.
|
|
void | updateTransparentBuffers (v3f camera_pos, v3s16 block_pos, bool group_by_buffers) |
| Update transparent buffers to render towards the camera.
|
|
void | consolidateTransparentBuffers () |
|
const std::vector< PartialMeshBuffer > & | getTransparentBuffers () const |
| get the list of transparent buffers
|
|
◆ MapBlockMesh()
References applyTileColor(), BS, MeshTriangle::buffer, MapBlockBspTree::buildTree(), CONTENT_IGNORE, g_settings, MapblockMeshGenerator::generate(), Settings::getBool(), MapNode::getContent(), MinimapMapblock::getMinimapNodes(), VoxelManipulator::getNodeNoEx(), IShaderSource::getShaderInfo(), ITextureSource::getTextureForMesh(), ITextureSource::getTextureName(), intToFloat(), m_animation_info, MeshMakeData::m_blockpos, m_bounding_radius, MeshCollector::m_bounding_radius_sq, m_bounding_sphere_center, m_bsp_tree, m_crack_materials, m_has_animation, m_mesh, m_minimap_mapblocks, m_shdrsrc, m_transparent_triangles, m_tsrc, MeshMakeData::m_vmanip, MAP_BLOCKSIZE, ShaderInfo::material, MATERIAL_FLAG_ANIMATION, MATERIAL_FLAG_CRACK, MATERIAL_FLAG_CRACK_OVERLAY, MAX_TILE_LAYERS, noise3d(), p(), MeshTriangle::p1, MeshTriangle::p2, MeshTriangle::p3, MeshCollector::prebuffers, MeshMakeData::side_length, MeshTriangle::updateAttributes(), and ZoneScoped.
◆ ~MapBlockMesh()
MapBlockMesh::~MapBlockMesh |
( |
| ) |
|
◆ animate()
bool MapBlockMesh::animate |
( |
bool | faraway, |
|
|
float | time, |
|
|
int | crack, |
|
|
u32 | daynight_ratio ) |
References TileLayer::animation_frame_count, TileLayer::animation_frame_length_ms, TileLayer::frames, ITextureSource::getTextureForMesh(), itos(), m_animation_force_timer, m_animation_info, m_crack_materials, m_has_animation, m_last_crack, m_mesh, m_tsrc, myrand_range(), FrameSpec::texture, TileLayer::texture, and TileLayer::texture_id.
Referenced by ClientMap::renderMap().
◆ consolidateTransparentBuffers()
void MapBlockMesh::consolidateTransparentBuffers |
( |
| ) |
|
◆ decreaseAnimationForceTimer()
void MapBlockMesh::decreaseAnimationForceTimer |
( |
| ) |
|
|
inline |
◆ getBoundingRadius()
f32 MapBlockMesh::getBoundingRadius |
( |
| ) |
const |
|
inline |
◆ getBoundingSphereCenter()
v3f MapBlockMesh::getBoundingSphereCenter |
( |
| ) |
const |
|
inline |
◆ getMesh() [1/2]
scene::IMesh * MapBlockMesh::getMesh |
( |
| ) |
|
|
inline |
◆ getMesh() [2/2]
scene::IMesh * MapBlockMesh::getMesh |
( |
u8 | layer | ) |
|
|
inline |
◆ getTransparentBuffers()
const std::vector< PartialMeshBuffer > & MapBlockMesh::getTransparentBuffers |
( |
| ) |
const |
|
inline |
◆ isAnimationForced()
bool MapBlockMesh::isAnimationForced |
( |
| ) |
const |
|
inline |
◆ moveMinimapMapblocks()
◆ updateTransparentBuffers()
void MapBlockMesh::updateTransparentBuffers |
( |
v3f | camera_pos, |
|
|
v3s16 | block_pos, |
|
|
bool | group_by_buffers ) |
Update transparent buffers to render towards the camera.
- Parameters
-
group_by_buffers | If true, triangles in the same buffer are batched into the same PartialMeshBuffer, resulting in fewer draw calls, but wrong order. Triangles within a single buffer are still ordered, and buffers are ordered relative to each other (with respect to their nearest triangle). |
References BS, intToFloat(), m_bsp_tree, m_transparent_buffers, m_transparent_buffers_consolidated, m_transparent_triangles, MAP_BLOCKSIZE, and MapBlockBspTree::traverse().
Referenced by ClientMap::updateTransparentMeshBuffers().
◆ m_animation_force_timer
int MapBlockMesh::m_animation_force_timer |
|
private |
◆ m_animation_info
std::map<std::pair<u8, u32>, AnimationInfo> MapBlockMesh::m_animation_info |
|
private |
◆ m_bounding_radius
f32 MapBlockMesh::m_bounding_radius |
|
private |
◆ m_bounding_sphere_center
v3f MapBlockMesh::m_bounding_sphere_center |
|
private |
◆ m_bsp_tree
◆ m_crack_materials
std::map<std::pair<u8, u32>, std::string> MapBlockMesh::m_crack_materials |
|
private |
◆ m_has_animation
bool MapBlockMesh::m_has_animation |
|
private |
◆ m_last_crack
int MapBlockMesh::m_last_crack |
|
private |
◆ m_mesh
◆ m_minimap_mapblocks
◆ m_shdrsrc
◆ m_transparent_buffers
◆ m_transparent_buffers_consolidated
bool MapBlockMesh::m_transparent_buffers_consolidated = false |
|
private |
◆ m_transparent_triangles
std::vector<MeshTriangle> MapBlockMesh::m_transparent_triangles |
|
private |
◆ m_tsrc
The documentation for this class was generated from the following files: