diff options
Diffstat (limited to 'src/client/mapblock_mesh.h')
-rw-r--r-- | src/client/mapblock_mesh.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/mapblock_mesh.h b/src/client/mapblock_mesh.h index 169b3a8c1..f22dd68bd 100644 --- a/src/client/mapblock_mesh.h +++ b/src/client/mapblock_mesh.h @@ -100,7 +100,7 @@ public: }; /** - * Implements a binary space partitioning tree + * Implements a binary space partitioning tree * See also: https://en.wikipedia.org/wiki/Binary_space_partitioning */ class MapBlockBspTree @@ -221,6 +221,12 @@ public: m_animation_force_timer--; } + /// Radius of the bounding-sphere, in BS-space. + f32 getBoundingRadius() const { return m_bounding_radius; } + + /// Center of the bounding-sphere, in BS-space, relative to block pos. + v3f getBoundingSphereCenter() const { return m_bounding_sphere_center; } + /// update transparent buffers to render towards the camera void updateTransparentBuffers(v3f camera_pos, v3s16 block_pos); void consolidateTransparentBuffers(); @@ -243,6 +249,10 @@ private: ITextureSource *m_tsrc; IShaderSource *m_shdrsrc; + f32 m_bounding_radius; + // MapblockMeshGenerator uses the same as mapblock center + v3f m_bounding_sphere_center = v3f((MAP_BLOCKSIZE * 0.5f - 0.5f) * BS); + bool m_enable_shaders; bool m_enable_vbo; |