public class TransformRegion extends AbstractRegion
Transform
.Transform
world
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(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.
|
Vector3 |
getCenter()
Get the center point of a region.
|
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.
|
Region |
getRegion()
Get the untransformed, base region.
|
Transform |
getTransform()
Get the transform that is applied.
|
long |
getVolume()
Get the number of blocks in the region.
|
int |
getWidth()
Get X-size.
|
java.util.Iterator<BlockVector3> |
iterator()
Get the iterator.
|
java.util.List<BlockVector2> |
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(BlockVector3 change)
Shift the region.
|
clone, getChunkCubes, getChunks, getWorld, getWorldMaxY, getWorldMinY, setWorld
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArea, getBoundingBox
public TransformRegion(Region region, Transform transform)
region
- the regiontransform
- the transformpublic Region getRegion()
public Transform getTransform()
public void setTransform(Transform transform)
transform
- the transformpublic BlockVector3 getMinimumPoint()
Region
public BlockVector3 getMaximumPoint()
Region
public Vector3 getCenter()
Region
getCenter
in interface Region
getCenter
in class AbstractRegion
public long getVolume()
Region
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
- if the operation cannot be performedpublic void contract(BlockVector3... changes) throws RegionOperationException
Region
changes
- array/arguments with multiple related changesRegionOperationException
- if the operation cannot be performedpublic void shift(BlockVector3 change) throws RegionOperationException
Region
shift
in interface Region
shift
in class AbstractRegion
change
- the changeRegionOperationException
- if the operation cannot be performedpublic boolean contains(BlockVector3 position)
Region
position
- the positionpublic java.util.List<BlockVector2> polygonize(int maxPoints)
Region
polygonize
in interface Region
polygonize
in class AbstractRegion
maxPoints
- maximum number of points to generate. -1 for no limit.public java.util.Iterator<BlockVector3> iterator()
AbstractRegion
iterator
in interface java.lang.Iterable<BlockVector3>
iterator
in class AbstractRegion