public class CylinderRegion extends AbstractRegion implements FlatRegion
world| Constructor and Description |
|---|
CylinderRegion()
Construct the region
|
CylinderRegion(CylinderRegion region) |
CylinderRegion(LocalWorld world)
Construct the region.
|
CylinderRegion(LocalWorld world,
Vector center,
Vector2D radius,
int minY,
int maxY)
Construct the region.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Vector2D> |
asFlatRegion() |
CylinderRegion |
clone() |
boolean |
contains(Vector pt)
Checks to see if a point is inside this region.
|
void |
contract(Vector... changes)
Contract the region.
|
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()
Returns the main center point of the cylinder
|
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, setWorldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChunkCubes, getChunks, getWorld, setWorldpublic CylinderRegion()
public CylinderRegion(LocalWorld world)
world - public CylinderRegion(LocalWorld world, Vector center, Vector2D radius, int minY, int maxY)
world - center - radius - minY - maxY - public CylinderRegion(CylinderRegion region)
public Vector getCenter()
getCenter in interface RegiongetCenter in class AbstractRegion@Deprecated public void setCenter(Vector center)
setCenter(Vector2D)public void setCenter(Vector2D center)
center - public Vector2D getRadius()
public void setRadius(Vector2D radius)
radius - public void extendRadius(Vector2D minRadius)
minRadius - public void setMinimumY(int y)
y - public void setMaximumY(int y)
y - public Vector getMinimumPoint()
getMinimumPoint in interface Regionpublic Vector getMaximumPoint()
getMaximumPoint in interface Regionpublic int getMaximumY()
getMaximumY in interface FlatRegionpublic int getMinimumY()
getMinimumY in interface FlatRegionpublic int getArea()
getArea in interface RegiongetArea in class AbstractRegionpublic int getWidth()
getWidth in interface RegiongetWidth in class AbstractRegionpublic int getHeight()
getHeight in interface RegiongetHeight in class AbstractRegionpublic int getLength()
getLength 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 AbstractRegionRegionOperationExceptionpublic boolean contains(Vector pt)
public boolean setY(int y)
y - public Iterator<BlockVector> iterator()
AbstractRegioniterator in interface Iterable<BlockVector>iterator in class AbstractRegionpublic Iterable<Vector2D> asFlatRegion()
asFlatRegion in interface FlatRegionpublic String toString()
public CylinderRegion clone()
clone 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.Copyright © 2010-2014. All Rights Reserved.