From 3229fcd62e85a0b0780636e64d786b4a53b1ee73 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sat, 4 Jul 2009 18:44:00 +0000 Subject: [PATCH] Added comment. --- library/PolyVoxCore/source/IndexedSurfacePatch.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/PolyVoxCore/source/IndexedSurfacePatch.cpp b/library/PolyVoxCore/source/IndexedSurfacePatch.cpp index ab9d8329..33333bbb 100644 --- a/library/PolyVoxCore/source/IndexedSurfacePatch.cpp +++ b/library/PolyVoxCore/source/IndexedSurfacePatch.cpp @@ -171,6 +171,14 @@ namespace PolyVox } } + //////////////////////////////////////////////////////////////////////////////// + /// This function can help improve the visual appearance of a surface patch by + /// smoothing normals with other nearby normals. It iterates over each triangle + /// in the surface patch and determines the sum of its corners normals. For any + /// given vertex, these sums are in turn summed for any triangles which use the + /// vertex. Usually, the resulting normals should be renormalised afterwards. + /// Note: This function can cause lighting discontinuities accross region boundaries. + //////////////////////////////////////////////////////////////////////////////// void IndexedSurfacePatch::sumNearbyNormals(bool bNormalise) { if(m_vecVertices.size() == 0) //FIXME - I don't think we should need this test, but I have seen crashes otherwise...