From fe1f72ab0ac8bcc233c91eb5b2d71bd2d2574cf8 Mon Sep 17 00:00:00 2001 From: Danila Shutov Date: Sun, 7 Jun 2020 19:14:00 +0300 Subject: Recalculate mesh normals for CAOs (#10000) --- src/client/mesh.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/client/mesh.h') 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 @@ -121,6 +121,12 @@ scene::IMesh* convertNodeboxesToMesh(const std::vector &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 -- cgit v1.2.3