You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The MollerTrumboreIntersect class implemented triangle, quad and polygon intersect. The main call is getIntersection, which checks for the class requesting the intersection. This really looks like the getIntersection function should exist in each class (Triangle, Quad and Polygon) and should simply implement the specifics of the intersection.
Why is this not the case?
To Reproduce
See MollerTrumboreIntersect.getIntersection()
Expected Design
Looks like a simple chip method for each case would work
The text was updated successfully, but these errors were encountered:
While the current implementation can feel a bit misaligned with OO practices (depending on your interpretation of the domain), it has benefits:
Flexible intersection strategies (OCP) with easy injection through a single IntersectionFinder endpoint, rather than managing separate objects (polygon, triangle, quad, bounding box). This was used extensively in the past to compare the performance of different intersectors and while we have settled on a preferred solution, I would be hesitant to remove this flexibility.
From my point of view, the intersection module is at a higher-level than the geometry module and is also quite complex, so the current implementation clearly seperates concerns (SRP).
Describe the bug
The
MollerTrumboreIntersect
class implemented triangle, quad and polygon intersect. The main call isgetIntersection
, which checks for the class requesting the intersection. This really looks like thegetIntersection
function should exist in each class (Triangle, Quad and Polygon) and should simply implement the specifics of the intersection.Why is this not the case?
To Reproduce
See
MollerTrumboreIntersect.getIntersection()
Expected Design
Looks like a simple chip method for each case would work
The text was updated successfully, but these errors were encountered: