1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-19 03:05:29 +02:00

Recalculate mesh normals for CAOs (#10000)

This commit is contained in:
Danila Shutov
2020-06-07 19:14:00 +03:00
committed by GitHub
parent 8fc9e7eb11
commit fe1f72ab0a
3 changed files with 34 additions and 0 deletions

View File

@@ -121,6 +121,12 @@ scene::IMesh* convertNodeboxesToMesh(const std::vector<aabb3f> &boxes,
*/
void recalculateBoundingBox(scene::IMesh *src_mesh);
/*
Check if mesh has valid normals and return true if it does.
We assume normal to be valid when it's 0 < length < Inf. and not NaN
*/
bool checkMeshNormals(scene::IMesh *mesh);
/*
Vertex cache optimization according to the Forsyth paper:
http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html