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
ConstructorsConstructorDescriptionEllipsoidRegion(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.booleancontains(int x, int z) booleancontains(int x, int y, int z) booleancontains(BlockVector3 position) Returns true based on whether the region contains the point.voidcontract(BlockVector3... changes) Contract the region.voidexpand(BlockVector3... changes) Expand the region.voidextendRadius(Vector3 minRadius) voidfilter(IChunk chunk, Filter filter, ChunkFilterBlock block, IChunkGet get, IChunkSet set, boolean full) Get the center.Get a list of chunks.intGet Y-size.intGet Z-size.Get the upper point of a region.Get the lower point of a region.Get the radii.longGet the number of blocks in the region.intgetWidth()Get X-size.voidsetCenter(BlockVector3 center) Set the center.voidSet the radii.voidshift(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, sizeMethods inherited from class java.util.AbstractSet
removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
flush, join, joinPost, postProcess, postProcessSet, processGet, processGet, remove, trimNBT, trimNBT, trimYMethods 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:RegionGet the lower point of a region.- Returns:
- min. point
-
getMaximumPoint
Description copied from interface:RegionGet the upper point of a region.- Returns:
- max. point
-
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
-
getCenter
Get the center.- Specified by:
getCenterin interfaceRegion- Overrides:
getCenterin 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:AbstractRegionGet a list of chunks.- Specified by:
getChunksin interfaceRegion- Overrides:
getChunksin classAbstractRegion- Returns:
- a set of chunks
-
contains
public boolean contains(int x, int y, int z) -
contains
Description copied from interface:RegionReturns 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:
toStringin classAbstractCollection<BlockVector3>- Returns:
- string
-
extendRadius
-
clone
Description copied from interface:RegionMake a clone of the region.- Specified by:
clonein interfaceRegion- Overrides:
clonein classAbstractRegion- Returns:
- a cloned version
-
filter
public void filter(IChunk chunk, Filter filter, ChunkFilterBlock block, IChunkGet get, IChunkSet set, boolean full)
-