diff options
author | Danila Shutov <dcbrwn2@gmail.com> | 2020-06-07 19:14:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 18:14:00 +0200 |
commit | fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8 (patch) | |
tree | 4be77389e38c97dd1391439f212db642b16fac0b /src/client/mesh.h | |
parent | 8fc9e7eb117849202b87bf3d764cd3eac6f68c74 (diff) | |
download | minetest-fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8.tar.gz minetest-fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8.tar.bz2 minetest-fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8.zip |
Recalculate mesh normals for CAOs (#10000)
Diffstat (limited to 'src/client/mesh.h')
-rw-r--r-- | src/client/mesh.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/mesh.h b/src/client/mesh.h index 0c4094de2..103c61e45 100644 --- a/src/client/mesh.h +++ b/src/client/mesh.h @@ -122,6 +122,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 Ported from irrlicht 1.8 |