1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

MeshMakeData: Explain members, and add grid size and minimap flag

This commit is contained in:
Desour 2025-01-08 10:01:13 +01:00 committed by DS
parent c0ce918d77
commit d044c27b5f
6 changed files with 49 additions and 35 deletions

View file

@ -36,15 +36,25 @@ struct MinimapMapblock;
struct MeshMakeData
{
VoxelManipulator m_vmanip;
// base pos of meshgen area, in blocks
v3s16 m_blockpos = v3s16(-1337,-1337,-1337);
// size of meshgen area, in nodes.
// vmanip will have at least an extra 1 node onion layer.
// area is expected to fit into mesh grid cell.
u16 m_side_length;
// vertex positions will be relative to this grid
MeshGrid m_mesh_grid;
// relative to blockpos
v3s16 m_crack_pos_relative = v3s16(-1337,-1337,-1337);
bool m_generate_minimap = false;
bool m_smooth_lighting = false;
bool m_enable_water_reflections = false;
u16 side_length;
const NodeDefManager *nodedef;
const NodeDefManager *m_nodedef;
MeshMakeData(const NodeDefManager *ndef, u16 side_length);
MeshMakeData(const NodeDefManager *ndef, u16 side_lingth, MeshGrid mesh_grid);
/*
Copy block data manually (to allow optimizations by the caller)