Class TransformRegion
java.lang.Object
java.util.AbstractCollection<BlockVector3>
java.util.AbstractSet<BlockVector3>
com.sk89q.worldedit.regions.AbstractRegion
com.sk89q.worldedit.regions.TransformRegion
- All Implemented Interfaces:
IBatchProcessor, Region, Cloneable, Iterable<BlockVector3>, Collection<BlockVector3>, Set<BlockVector3>
Transforms another region according to a provided vector
Transform.- See Also:
-
Field Summary
Fields inherited from class AbstractRegion
world -
Constructor Summary
ConstructorsConstructorDescriptionTransformRegion(Region region, Transform transform) Create a new instance.TransformRegion(World world, Region region, Transform transform) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(BlockVector3 position) Returns true based on whether the region contains the point.voidcontract(BlockVector3... changes) Contract the region.voidexpand(BlockVector3... changes) Expand the region.Get the center point of a region.intGet Y-size.intGet Z-size.Get the upper point of a region.Get the lower point of a region.Get the untransformed, base region.Get the transform that is applied.longGet the number of blocks in the region.intgetWidth()Get X-size.iterator()Get the iterator.polygonize(int maxPoints) Polygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.voidsetTransform(Transform transform) Set the transform that is applied.voidshift(BlockVector3 change) Shift the region.Methods inherited from class AbstractRegion
clone, equals, getChunkCubes, getChunks, getWorld, getWorldMaxY, getWorldMinY, hashCode, setWorld, sizeMethods inherited from class AbstractSet
removeAllMethods inherited from class AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface IBatchProcessor
flush, join, joinPost, postProcess, postProcessSet, processGet, processGet, remove, trimNBT, trimNBT, trimYMethods inherited from interface Region
construct, contains, contains, containsChunk, containsEntireCuboid, filter, filter, filter, filter, filter, getArea, getBoundingBox, getDimensions, getMaximumY, getMinimumY, getScope, isGlobal, processSet, processSet
-
Constructor Details
-
TransformRegion
-
TransformRegion
-
-
Method Details
-
getRegion
-
getTransform
-
setTransform
Set the transform that is applied.- Parameters:
transform- the transform
-
getMinimumPoint
-
getMaximumPoint
-
getCenter
-
getVolume
public long getVolume()Description copied from interface:RegionGet the number of blocks in the region.- Specified by:
getVolumein interfaceRegion- Overrides:
getVolumein classAbstractRegion- Returns:
- number of blocks
-
getWidth
public int getWidth()Description copied from class:AbstractRegionGet X-size.- Specified by:
getWidthin interfaceRegion- Overrides:
getWidthin classAbstractRegion- Returns:
- width
-
getHeight
public int getHeight()Description copied from class:AbstractRegionGet Y-size.- Specified by:
getHeightin interfaceRegion- Overrides:
getHeightin classAbstractRegion- Returns:
- height
-
getLength
public int getLength()Description copied from class:AbstractRegionGet Z-size.- Specified by:
getLengthin interfaceRegion- Overrides:
getLengthin classAbstractRegion- Returns:
- length
-
expand
Description copied from interface:RegionExpand the region.- Parameters:
changes- array/arguments with multiple related changes- Throws:
RegionOperationException- if the operation cannot be performed
-
contract
Description copied from interface:RegionContract the region.- Parameters:
changes- array/arguments with multiple related changes- Throws:
RegionOperationException- if the operation cannot be performed
-
shift
Description copied from interface:RegionShift the region.- Specified by:
shiftin interfaceRegion- Overrides:
shiftin classAbstractRegion- Parameters:
change- the change- Throws:
RegionOperationException- if the operation cannot be performed
-
contains
Description copied from interface:RegionReturns true based on whether the region contains the point.- Parameters:
position- the position- Returns:
- true if contained
-
polygonize
Description copied from interface:RegionPolygonizes a cross-section or a 2D projection of the region orthogonal to the Y axis.- Specified by:
polygonizein interfaceRegion- Overrides:
polygonizein classAbstractRegion- Parameters:
maxPoints- maximum number of points to generate. -1 for no limit.- Returns:
- the points.
-
iterator
Description copied from class:AbstractRegionGet the iterator.- Specified by:
iteratorin interfaceCollection<BlockVector3>- Specified by:
iteratorin interfaceIterable<BlockVector3>- Specified by:
iteratorin interfaceSet<BlockVector3>- Overrides:
iteratorin classAbstractRegion- Returns:
- iterator of points inside the region
-