Comp 2673, Spring 2002
May 17, lecture notes
Today we discuss something you'll need for your project - how to calculate the distance from a point (a mouse click position) to an object (a line, a rectangle, a circle, or a polygon). You'll need this because when a user clicks at a point to delete an object, you'll need to figure out which object they're trying to delete. This means that you'll have to go through your list of objects to find one/ones that is/are close to the clicked point.