1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Client map: do frustum culling via planes (#12710)

This commit is contained in:
DS 2022-09-18 15:28:53 +02:00 committed by GitHub
parent a428a0cf37
commit c9ed059d91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 113 additions and 42 deletions

View file

@ -37,6 +37,12 @@ struct PreMeshBuffer
struct MeshCollector
{
std::array<std::vector<PreMeshBuffer>, MAX_TILE_LAYERS> prebuffers;
// bounding sphere radius and center
f32 m_bounding_radius_sq = 0.0f;
v3f m_center_pos;
// center_pos: pos to use for bounding-sphere, in BS-space
MeshCollector(const v3f center_pos) : m_center_pos(center_pos) {}
// clang-format off
void append(const TileSpec &material,