kld-intersections icon indicating copy to clipboard operation
kld-intersections copied to clipboard

Add convenience layer for IntersectionQuery

Open thelonious opened this issue 8 years ago • 1 comments

Right now, you can use the intersection API 3 ways:

  1. Direct call to intersection method passing in essentially scalar values
  2. Via the Shapes API which still uses scalar values, but it creates intermediate objects for each support shape. These are then used by a single method in the intersection API to determine which low-level method to call
  3. Via the Affine Shapes API which is just like the Shapes API, but it lets you use Point2D, Vector2D, etc. in place of scalar values. This is for people who don't mind using those classes.

IntersectionQuery has been introduced recently and right now it has the equivalent of the intersection api's low-level interface. Using either of the Shapes API, we should be able to introduce a simple IntersectionQuery.contains(point, shape) method.

thelonious avatar Nov 21 '17 01:11 thelonious

A contains method (if not containsOrIntersects) sounds very useful!

brettz9 avatar Apr 28 '19 07:04 brettz9