public class FlatRegionOffset extends java.lang.Object implements FlatRegionFunction
Constructor and Description |
---|
FlatRegionOffset(Vector2D offset,
FlatRegionFunction function)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Vector2D position)
Apply the function to the given position.
|
Vector2D |
getOffset()
Get the offset that is added to the position.
|
void |
setOffset(Vector2D offset)
Set the offset that is added to the position.
|
public FlatRegionOffset(Vector2D offset, FlatRegionFunction function)
offset
- the offsetfunction
- the function that is called with the offset positionpublic Vector2D getOffset()
public void setOffset(Vector2D offset)
offset
- the offsetpublic boolean apply(Vector2D position) throws WorldEditException
FlatRegionFunction
apply
in interface FlatRegionFunction
position
- the positionWorldEditException
- thrown on an error