net.nexttext
Class RandomLocation
java.lang.Object
net.nexttext.RandomLocation
- All Implemented Interfaces:
- Locatable
public class RandomLocation
- extends java.lang.Object
- implements Locatable
A locatable which responds with a random location.
The location returned will be inside the given shape. The bounds of the
shape are checked on each call, so mutable shapes will be properly
supported.
Because of the way getLocation() is implemented, very thin shapes with
large bounding boxes may cause it to lock up in a loop trying to find a
point inside.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomLocation
public RandomLocation(java.awt.Shape shape)
getLocation
public processing.core.PVector getLocation()
- Specified by:
getLocation
in interface Locatable
- Returns:
- The object's location in absolute coordinates.