RandomPositionSource
public class RandomPositionSourceRectangular extends java.lang.Object implements RandomPositionSource
Modifier and Type | Field | Description |
---|---|---|
protected Box |
box |
|
protected Vector |
p |
|
protected IRandom |
random |
Constructor | Description |
---|---|
RandomPositionSourceRectangular(Space space,
IRandom random) |
Modifier and Type | Method | Description |
---|---|---|
Vector |
randomPosition() |
Returns a random position with the previously set box's boundary.
|
void |
setBox(Box newBox) |
Notifies the RandomPositionSource of the box from which random positions
should be taken from.
|
public Vector randomPosition()
RandomPositionSource
randomPosition
in interface RandomPositionSource
public void setBox(Box newBox)
RandomPositionSource
setBox
in interface RandomPositionSource