public class TransformRegion extends AbstractRegion
Transform.Transformworld| Constructor and Description |
|---|
TransformRegion(Region region,
Transform transform)
Create a new instance.
|
TransformRegion(World world,
Region region,
Transform transform)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
Vector |
getMinimumPoint()
Get the lower point of a region.
|
Region |
getRegion()
Get the untransformed, base region.
|
Transform |
getTransform()
Get the transform that is applied.
|
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 |
setTransform(Transform transform)
Set the transform that is applied.
|
void |
shift(Vector change)
Shift the region.
|
clone, getChunkCubes, getChunks, getWorld, setWorld, setWorldequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic TransformRegion(Region region, Transform transform)
region - the regiontransform - the transformpublic Region getRegion()
public Transform getTransform()
public void setTransform(Transform transform)
transform - the transformpublic Vector getMinimumPoint()
Regionpublic Vector getMaximumPoint()
Regionpublic Vector getCenter()
RegiongetCenter in interface RegiongetCenter in class AbstractRegionpublic 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
Regionchanges - array/arguments with multiple related changesRegionOperationExceptionpublic void contract(Vector... changes) throws RegionOperationException
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)
Regionposition - the positionpublic List<BlockVector2D> polygonize(int maxPoints)
Regionpolygonize in interface Regionpolygonize in class AbstractRegionmaxPoints - maximum number of points to generate. -1 for no limit.public Iterator<BlockVector> iterator()
AbstractRegioniterator in interface Iterable<BlockVector>iterator in class AbstractRegionCopyright © 2010-2014. All Rights Reserved.