public class CylinderRegion extends AbstractRegion implements FlatRegion
world| Constructor and Description |
|---|
CylinderRegion()
Construct the region
|
CylinderRegion(CylinderRegion region) |
CylinderRegion(LocalWorld world)
Deprecated.
cast
world to World |
CylinderRegion(LocalWorld world,
Vector center,
Vector2D radius,
int minY,
int maxY)
Deprecated.
|
CylinderRegion(Vector center,
Vector2D radius,
int minY,
int maxY)
Construct the region.
|
CylinderRegion(World world)
Construct the region.
|
CylinderRegion(World world,
Vector center,
Vector2D radius,
int minY,
int maxY)
Construct the region.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Vector2D> |
asFlatRegion()
Get this region as an iterable flat region.
|
CylinderRegion |
clone()
Make a clone of the region.
|
boolean |
contains(Vector position)
Checks to see if a point is inside this region.
|
void |
contract(Vector... changes)
Contract the region.
|
static CylinderRegion |
createRadius(Extent extent,
Vector center,
double radius)
Return a new instance with the given center and radius in the X and Z
axes with a Y that extends from the bottom of the extent to the top
of the extent.
|
void |
expand(Vector... changes)
Expand the region.
|
void |
extendRadius(Vector2D minRadius)
Extends the radius to be at least the given radius
|
int |
getArea()
Get the number of blocks in the region.
|
Vector |
getCenter()
Get the center point of a region.
|
int |
getHeight()
Get Y-size.
|
int |
getLength()
Get Z-size.
|
Vector |
getMaximumPoint()
Get the upper point of a region.
|
int |
getMaximumY()
Gets the maximum Y value
|
Vector |
getMinimumPoint()
Get the lower point of a region.
|
int |
getMinimumY()
Gets the minimum Y value
|
Vector2D |
getRadius()
Returns the radius of the cylinder
|
int |
getWidth()
Get X-size.
|
Iterator<BlockVector> |
iterator()
Get the iterator.
|
List<BlockVector2D> |
polygonize(int maxPoints)
Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.
|
void |
setCenter(Vector center)
Deprecated.
replaced by
setCenter(Vector2D) |
void |
setCenter(Vector2D center)
Sets the main center point of the region
|
void |
setMaximumY(int y)
Se the maximum Y.
|
void |
setMinimumY(int y)
Set the minimum Y.
|
void |
setRadius(Vector2D radius)
Sets the radius of the cylinder
|
boolean |
setY(int y)
Sets the height of the cylinder to fit the specified Y.
|
void |
shift(Vector change)
Shift the region.
|
String |
toString()
Returns string representation in the format
"(centerX, centerZ) - (radiusX, radiusZ) - (minY, maxY)"
|
getChunkCubes, getChunks, getWorld, setWorld, setWorldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChunkCubes, getChunks, getWorld, setWorld, setWorldforEach, spliteratorpublic CylinderRegion()
@Deprecated public CylinderRegion(LocalWorld world)
world to Worldpublic CylinderRegion(World world)
world - the world@Deprecated public CylinderRegion(LocalWorld world, Vector center, Vector2D radius, int minY, int maxY)
public CylinderRegion(World world, Vector center, Vector2D radius, int minY, int maxY)
world - the worldcenter - the center positionradius - the radius along the X and Z axesminY - the minimum Y, inclusivemaxY - the maximum Y, inclusivepublic CylinderRegion(Vector center, Vector2D radius, int minY, int maxY)
center - the center positionradius - the radius along the X and Z axesminY - the minimum Y, inclusivemaxY - the maximum Y, inclusivepublic CylinderRegion(CylinderRegion region)
public Vector getCenter()
RegiongetCenter in interface RegiongetCenter in class AbstractRegion@Deprecated public void setCenter(Vector center)
setCenter(Vector2D)public void setCenter(Vector2D center)
center - the center pointpublic Vector2D getRadius()
public void setRadius(Vector2D radius)
radius - the radius along the X and Z axespublic void extendRadius(Vector2D minRadius)
minRadius - the minimum radiuspublic void setMinimumY(int y)
y - the ypublic void setMaximumY(int y)
y - the ypublic Vector getMinimumPoint()
RegiongetMinimumPoint in interface Regionpublic Vector getMaximumPoint()
RegiongetMaximumPoint in interface Regionpublic int getMaximumY()
FlatRegiongetMaximumY in interface FlatRegionpublic int getMinimumY()
FlatRegiongetMinimumY in interface FlatRegionpublic int getArea()
AbstractRegiongetArea in interface RegiongetArea in class AbstractRegionpublic int getWidth()
AbstractRegiongetWidth in interface RegiongetWidth in class AbstractRegionpublic int getHeight()
AbstractRegiongetHeight in interface RegiongetHeight in class AbstractRegionpublic int getLength()
AbstractRegiongetLength in interface RegiongetLength in class AbstractRegionpublic void expand(Vector... changes) throws RegionOperationException
expand in interface Regionchanges - array/arguments with multiple related changesRegionOperationExceptionpublic void contract(Vector... changes) throws RegionOperationException
contract in interface Regionchanges - array/arguments with multiple related changesRegionOperationExceptionpublic void shift(Vector change) throws RegionOperationException
Regionshift in interface Regionshift in class AbstractRegionchange - the changeRegionOperationExceptionpublic boolean contains(Vector position)
public boolean setY(int y)
y - the y valuepublic Iterator<BlockVector> iterator()
AbstractRegioniterator in interface Iterable<BlockVector>iterator in class AbstractRegionpublic Iterable<Vector2D> asFlatRegion()
FlatRegionasFlatRegion in interface FlatRegionpublic String toString()
public CylinderRegion clone()
Regionclone in interface Regionclone in class AbstractRegionpublic List<BlockVector2D> polygonize(int maxPoints)
Regionpolygonize in interface Regionpolygonize in class AbstractRegionmaxPoints - maximum number of points to generate. -1 for no limit.public static CylinderRegion createRadius(Extent extent, Vector center, double radius)
extent - the extentcenter - the center positionradius - the radius in the X and Z axesCopyright © 2010-2014. All Rights Reserved.