Hi
I would use RTree class for this.
- Find BoundingBoxes (BB) for each object (curve)
- Populate RTree with these BB
- Call RTree.Search method on theses set with parameter BounidingBox which I would set to be bounding box between my testing pint and a point on lets say first object in the list of objects to test
- by calling Search method event will fire for every intersection of testing bounding box with BBoxes and callback method will be called for every event fired
- So you create your calback method where you can shrink testing bounding box by using some logic (origin of scale is your testing point), lets say by scale 0.5 size, and than search again (e.cancel has to be set to true in callback methot to stop testing other BB)
- If there is no intersection of BB and testing boxes than you should go back and enalrge testing box with scale factor 1.25 of actual size and RTree.Search againn
- You stop when scale change becomes small (you have to decide what it will be)
- You have to remember last boundong for which fire event occurs and than by using Rtree.Search with different callback method where you test for closest point of each object
- There is code for testing MashMash Collison where I use RTree for it,
see my post at this topic
Intersection.MeshMeshFast faster method?
If you need any further help let me know
Regards
Radovan