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