1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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