Visitors following paths..sort of..

This commit is contained in:
Yorick
2015-04-07 22:01:07 +02:00
parent f2c1544d71
commit 1f6811332e
3 changed files with 134 additions and 13 deletions
+19
View File
@@ -73,6 +73,25 @@ public class Path
}
}
/**
* Check if one of the lines contains the given point and return the Shape.
*
* @param point
* - The point of your object.
* @return if the Shape contains the point.
*/
public Shape containsPointShape(Point2D point)
{
for (Shape line : getPath())
{
if (line.contains(point))
{
return line;
}
}
return null;
}
/**
* Check if one of the lines contains the given point.
*