upgrade entities frustum culling

This commit is contained in:
MihailRis 2026-10-31 23:41:40 +03:00
parent 414a0947ab
commit c21871c3c9
9 changed files with 206 additions and 63 deletions

View file

@ -5,6 +5,7 @@
#include <glm/glm.hpp>
#include "maths/UVRegion.hpp"
#include "maths/aabb.hpp"
namespace model {
struct Vertex {
@ -82,6 +83,7 @@ namespace model {
struct Model {
std::vector<Mesh> meshes;
AABB bounds {glm::vec3(0.0f), glm::vec3(0.0f)};
/// @brief Add mesh to the model
/// @param texture texture name
@ -96,6 +98,9 @@ namespace model {
return meshes[meshes.size() - 1];
}
void calcBounds();
const AABB& getBounds() const;
/// @brief Remove all empty meshes
void clean();