Package com.sk89q.worldedit.regions
Class EllipsoidRegion
java.lang.Object
java.util.AbstractCollection<BlockVector3>
java.util.AbstractSet<BlockVector3>
com.sk89q.worldedit.regions.AbstractRegion
com.sk89q.worldedit.regions.EllipsoidRegion
- All Implemented Interfaces:
IBatchProcessor
,Region
,Cloneable
,Iterable<BlockVector3>
,Collection<BlockVector3>
,Set<BlockVector3>
Represents an ellipsoid region.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.regions.AbstractRegion
world
-
Constructor Summary
ConstructorDescriptionEllipsoidRegion
(BlockVector3 pos1, Vector3 pos2) Construct a new instance of this ellipsoid region.EllipsoidRegion
(EllipsoidRegion ellipsoidRegion) EllipsoidRegion
(World world, BlockVector3 center, Vector3 radius) Construct a new instance of this ellipsoid region. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Make a clone of the region.boolean
contains
(int x, int z) boolean
contains
(int x, int y, int z) 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.void
extendRadius
(Vector3 minRadius) void
filter
(IChunk chunk, Filter filter, ChunkFilterBlock block, IChunkGet get, IChunkSet set, boolean full) Get the center.Get a list of chunks.int
Get Y-size.int
Get Z-size.Get the upper point of a region.Get the lower point of a region.Get the radii.long
Get the number of blocks in the region.int
getWidth()
Get X-size.void
setCenter
(BlockVector3 center) Set the center.void
Set the radii.void
shift
(BlockVector3 change) Shift the region.toString()
Returns string representation in the format "(centerX, centerY, centerZ) - (radiusX, radiusY, radiusZ)".Methods inherited from class com.sk89q.worldedit.regions.AbstractRegion
equals, getChunkCubes, getWorld, getWorldMaxY, getWorldMinY, hashCode, iterator, polygonize, setWorld, size
Methods inherited from class java.util.AbstractSet
removeAll
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
flush, join, joinPost, postProcess, postProcessSet, processGet, remove, trimNBT, trimNBT, trimY
Methods inherited from interface com.sk89q.worldedit.regions.Region
construct, containsChunk, containsEntireCuboid, filter, filter, filter, filter, getArea, getBoundingBox, getDimensions, getMaximumY, getMinimumY, getScope, isGlobal, processSet, processSet
-
Constructor Details
-
EllipsoidRegion
Construct a new instance of this ellipsoid region.- Parameters:
pos1
- the first positionpos2
- the second position
-
EllipsoidRegion
Construct a new instance of this ellipsoid region.- Parameters:
world
- the worldcenter
- the centerradius
- the radius
-
EllipsoidRegion
-
-
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
-
getVolume
public long getVolume()Description copied from interface:Region
Get the number of blocks in the region.- Specified by:
getVolume
in interfaceRegion
- Overrides:
getVolume
in classAbstractRegion
- Returns:
- number of blocks
-
getWidth
public int getWidth()Description copied from class:AbstractRegion
Get X-size.- Specified by:
getWidth
in interfaceRegion
- Overrides:
getWidth
in classAbstractRegion
- Returns:
- width
-
getHeight
public int getHeight()Description copied from class:AbstractRegion
Get Y-size.- Specified by:
getHeight
in interfaceRegion
- Overrides:
getHeight
in classAbstractRegion
- Returns:
- height
-
getLength
public int getLength()Description copied from class:AbstractRegion
Get Z-size.- Specified by:
getLength
in interfaceRegion
- Overrides:
getLength
in classAbstractRegion
- Returns:
- length
-
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
-
shift
Description copied from interface:Region
Shift the region.- Specified by:
shift
in interfaceRegion
- Overrides:
shift
in classAbstractRegion
- Parameters:
change
- the change- Throws:
RegionOperationException
- if the operation cannot be performed
-
getCenter
Get the center.- Specified by:
getCenter
in interfaceRegion
- Overrides:
getCenter
in classAbstractRegion
- Returns:
- center
-
setCenter
Set the center.- Parameters:
center
- the center
-
getRadius
Get the radii.- Returns:
- radii
-
setRadius
Set the radii.- Parameters:
radius
- the radius
-
getChunks
Description copied from class:AbstractRegion
Get a list of chunks.- Specified by:
getChunks
in interfaceRegion
- Overrides:
getChunks
in classAbstractRegion
- Returns:
- a set of chunks
-
contains
public boolean contains(int x, int y, int z) -
contains
Description copied from interface:Region
Returns true based on whether the region contains the point.- Parameters:
position
- the position- Returns:
- true if contained
-
contains
public boolean contains(int x, int z) -
toString
Returns string representation in the format "(centerX, centerY, centerZ) - (radiusX, radiusY, radiusZ)".- Overrides:
toString
in classAbstractCollection<BlockVector3>
- Returns:
- string
-
extendRadius
-
clone
Description copied from interface:Region
Make a clone of the region.- Specified by:
clone
in interfaceRegion
- Overrides:
clone
in classAbstractRegion
- Returns:
- a cloned version
-
filter
public void filter(IChunk chunk, Filter filter, ChunkFilterBlock block, IChunkGet get, IChunkSet set, boolean full)
-