public class EllipsoidRegion extends AbstractRegion
world
Constructor and Description |
---|
EllipsoidRegion(EllipsoidRegion ellipsoidRegion) |
EllipsoidRegion(Vector pos1,
Vector pos2)
Construct a new instance of this ellipsoid region.
|
EllipsoidRegion(World world,
Vector center,
Vector radius)
Construct a new instance of this ellipsoid region.
|
Modifier and Type | Method and Description |
---|---|
EllipsoidRegion |
clone()
Make a clone of the region.
|
boolean |
contains(Vector position)
Returns true based on whether the region contains the point.
|
void |
contract(Vector... changes)
Contract the region.
|
void |
expand(Vector... changes)
Expand the region.
|
void |
extendRadius(Vector minRadius) |
int |
getArea()
Get the number of blocks in the region.
|
Vector |
getCenter()
Get the center.
|
java.util.Set<Vector2D> |
getChunks()
Get a list of chunks.
|
int |
getHeight()
Get Y-size.
|
int |
getLength()
Get Z-size.
|
Vector |
getMaximumPoint()
Get the upper point of a region.
|
Vector |
getMinimumPoint()
Get the lower point of a region.
|
Vector |
getRadius()
Get the radii.
|
int |
getWidth()
Get X-size.
|
void |
setCenter(Vector center)
Set the center.
|
void |
setRadius(Vector radius)
Set the radii.
|
void |
shift(Vector change)
Shift the region.
|
java.lang.String |
toString()
Returns string representation in the format
"(centerX, centerY, centerZ) - (radiusX, radiusY, radiusZ)".
|
getChunkCubes, getWorld, iterator, polygonize, setWorld
public EllipsoidRegion(Vector pos1, Vector pos2)
pos1
- the first positionpos2
- the second positionpublic EllipsoidRegion(World world, Vector center, Vector radius)
world
- the worldcenter
- the centerradius
- the radiuspublic EllipsoidRegion(EllipsoidRegion ellipsoidRegion)
public Vector getMinimumPoint()
Region
public Vector getMaximumPoint()
Region
public int getArea()
AbstractRegion
getArea
in interface Region
getArea
in class AbstractRegion
public int getWidth()
AbstractRegion
getWidth
in interface Region
getWidth
in class AbstractRegion
public int getHeight()
AbstractRegion
getHeight
in interface Region
getHeight
in class AbstractRegion
public int getLength()
AbstractRegion
getLength
in interface Region
getLength
in class AbstractRegion
public void expand(Vector... changes) throws RegionOperationException
Region
changes
- array/arguments with multiple related changesRegionOperationException
public void contract(Vector... changes) throws RegionOperationException
Region
changes
- array/arguments with multiple related changesRegionOperationException
public void shift(Vector change) throws RegionOperationException
Region
shift
in interface Region
shift
in class AbstractRegion
change
- the changeRegionOperationException
public Vector getCenter()
getCenter
in interface Region
getCenter
in class AbstractRegion
public void setCenter(Vector center)
center
- the centerpublic Vector getRadius()
public void setRadius(Vector radius)
radius
- the radiuspublic java.util.Set<Vector2D> getChunks()
AbstractRegion
getChunks
in interface Region
getChunks
in class AbstractRegion
public boolean contains(Vector position)
Region
position
- the positionpublic java.lang.String toString()
toString
in class java.lang.Object
public void extendRadius(Vector minRadius)
public EllipsoidRegion clone()
Region
clone
in interface Region
clone
in class AbstractRegion