Package com.sk89q.worldedit.regions
Class RegionIntersection
java.lang.Object
com.sk89q.worldedit.regions.AbstractRegion
com.sk89q.worldedit.regions.RegionIntersection
- All Implemented Interfaces:
Region
,Cloneable
,Iterable<BlockVector3>
An intersection of several other regions. Any location that is contained in one
of the child regions is considered as contained by this region.
iterator()
returns a special iterator that will iterate through
the iterators of each region in an undefined sequence. Some positions may
be repeated if the position is contained in more than one region, but this cannot
be guaranteed to occur.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.regions.AbstractRegion
world
-
Constructor Summary
ConstructorDescriptionRegionIntersection
(Region... regions) Create a new instance with the included list of regions.RegionIntersection
(World world, Region... regions) Create a new instance with the included list of regions.RegionIntersection
(World world, List<Region> regions) Create a new instance with the included list of regions.RegionIntersection
(List<Region> regions) Create a new instance with the included list of regions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.Get the upper point of a region.Get the lower point of a region.iterator()
Get the iterator.Methods inherited from class com.sk89q.worldedit.regions.AbstractRegion
clone, getCenter, getChunkCubes, getChunks, getHeight, getLength, getVolume, getWidth, getWorld, getWorldMaxY, getWorldMinY, polygonize, setWorld, shift
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.sk89q.worldedit.regions.Region
getArea, getBoundingBox
-
Constructor Details
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
regions
- a list of regions, which is copied
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
regions
- a list of regions, which is copied
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
world
- the worldregions
- a list of regions, which is copied
-
RegionIntersection
Create a new instance with the included list of regions.- Parameters:
world
- the worldregions
- an array of regions, which is copied
-
-
Method Details
-
getMinimumPoint
Description copied from interface:Region
Get the lower point of a region.- Returns:
- min. point
-
getMaximumPoint
Description copied from interface:Region
Get the upper point of a region.- Returns:
- max. point
-
expand
Description copied from interface:Region
Expand the region.- Parameters:
changes
- array/arguments with multiple related changes- Throws:
RegionOperationException
- if the operation cannot be performed
-
contract
Description copied from interface:Region
Contract the region.- Parameters:
changes
- array/arguments with multiple related changes- Throws:
RegionOperationException
- if the operation cannot be performed
-
contains
Description copied from interface:Region
Returns true based on whether the region contains the point.- Parameters:
position
- the position- Returns:
- true if contained
-
iterator
Description copied from class:AbstractRegion
Get the iterator.- Specified by:
iterator
in interfaceIterable<BlockVector3>
- Overrides:
iterator
in classAbstractRegion
- Returns:
- iterator of points inside the region
-