Skip to content

Commit

Permalink
start sketching coincident-point?
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed May 26, 2024
1 parent b946d58 commit 5735820
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/shimmers/math/geometry/collisions.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,12 @@
(defmethod coincident-edge?
[Polygon2 Rect2] [a b]
(some? (coincident-polygon? a (g/as-polygon b))))

;; TODO: should there be a helper for finding all intersecting points between two shapes?
;; ie window-glimpses/intersecting-points or intertwined/intersections

;; FIXME shoudl this be iff, ie only the case if coincident-point is unique?
(defmulti coincident-point?
"Test if shapes `a` and `b` share a single point in common, either at a vertice or along
an intersecting edge."
(fn [a b] [(type a) (type b)]))

0 comments on commit 5735820

Please sign in to comment.