mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 18:09:46 +00:00
upgrade entities frustum culling
This commit is contained in:
parent
414a0947ab
commit
c21871c3c9
9 changed files with 206 additions and 63 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue