diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2023-03-13 07:13:25 -0700 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2023-05-12 12:06:59 +0200 |
commit | 0c312c7a08cfc807de809ba281553927209b9a79 (patch) | |
tree | 5002ae592aa4fde110a68e5b92eb54d17fa8a71d /thirdparty/icu4c/common/sprpimpl.h | |
parent | c8d64e8580da5bf53ccbb5790389b310d3d68e2d (diff) |
Fix CSG edge case causing intersection line to hit on common edge of 2 triangles.
The previous implementation assumed that the intersection entered or exited a
shape when it hit right on the common edge of 2 triangles. However, there is
also a case where it just "skirts" the other shape on the outside.
To fix this, we added code to check the intersection distance and if the
normals of the faces are pointed in the same direction as the intersection or
not (e.g. inner product > 0). This handles the case where the intersection
line hits the common edge of 2 triangles and skirts the other shape on the
outside.
Extended code to cover a third case.
Fixes #58637.
Co-authored-by: OldBelge <StevenGeens@users.noreply.github.com>
(cherry picked from commit eaa84bc682dfb7f1f97970c7f4dfd4c6e63ba681)
Diffstat (limited to 'thirdparty/icu4c/common/sprpimpl.h')
0 files changed, 0 insertions, 0 deletions