File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CSmoothNormalGenerator::processConne
9999 {
100100 auto normal = processedVertex.weightedNormal ;
101101
102+ // We perform double the work (since `vxcmp` must be commutative but not required to be associative) intentionally,
103+ // because without guaranteed associativity we cannot partition the vertices into disjoint sets (we're not reconstructing OBJ-like
104+ // smooth groups with this), so we can't have all vertices in a set just copy their normal from a "master vertex".
105+ // For an example of why that is good, think of a cone or cylinder and why its good to have non-associative smoothing predicate.
102106 vertexHashMap.forEachBroadphaseNeighborCandidates (processedVertex.getPosition (), [&](const VertexHashMap::vertex_data_t & candidate)
103107 {
104108 if (processedVertex.index != candidate.index && compareVertexPosition (processedVertex.position , candidate.position , epsilon) &&
@@ -120,4 +124,4 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CSmoothNormalGenerator::processConne
120124}
121125
122126}
123- }
127+ }
You can’t perform that action at this time.
0 commit comments