This project has moved. For the latest updates, please go here.

RayHelper- return first geometry

May 4, 2010 at 6:29 AM
Edited May 4, 2010 at 6:32 AM



The place I would see it occuring would be in the function LineSegmentAllGeomsIntersect (my added code is in bold)


priority_queue GeometryPriority = new priority_queue(empty)

function LineSegmentAllGeomIntersect()

foreach(body in simulator)


   detect if intersecting

   if (count>0)


        add point to list

        priority_queue: add geom with priority distance


return geoms



game code:


RayHelper myHelper;






Now, I have a few questions then:

How would the implementation actually look like?

I'm pretty new to XNA, and tried finding a class for priority queue but none were found.