Class PolyhedralRegion
java.lang.Object
java.util.AbstractCollection<BlockVector3>
java.util.AbstractSet<BlockVector3>
com.sk89q.worldedit.regions.AbstractRegion
com.fastasyncworldedit.core.regions.PolyhedralRegion
- All Implemented Interfaces:
IBatchProcessor,Region,Cloneable,Iterable<BlockVector3>,Collection<BlockVector3>,Set<BlockVector3>
-
Field Summary
Fields inherited from class com.sk89q.worldedit.regions.AbstractRegion
world -
Constructor Summary
ConstructorsConstructorDescriptionPolyhedralRegion(PolyhedralRegion region) Constructs an independent copy of the given region.PolyhedralRegion(World world) Constructs an empty mesh, containing no vertices or triangles. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddVertex(BlockVector3 vertex) Add a vertex to the region.voidclear()Clears the region, removing all vertices and triangles.clone()Make a clone of the region.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.Get the center point of a region.Get the upper point of a region.Get the lower point of a region.booleanvoidshift(BlockVector3 change) Shift the region.Methods inherited from class com.sk89q.worldedit.regions.AbstractRegion
equals, getChunkCubes, getChunks, getHeight, getLength, getVolume, getWidth, getWorld, getWorldMaxY, getWorldMinY, hashCode, iterator, polygonize, setWorld, sizeMethods inherited from class java.util.AbstractSet
removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods 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, contains, contains, containsChunk, containsEntireCuboid, filter, filter, filter, filter, filter, getArea, getBoundingBox, getDimensions, getMaximumY, getMinimumY, getScope, isGlobal, processSet, processSet
-
Constructor Details
-
PolyhedralRegion
Constructs an empty mesh, containing no vertices or triangles.- Parameters:
world- the world
-
PolyhedralRegion
Constructs an independent copy of the given region.- Parameters:
region- the region to copy
-
-
Method Details
-
clear
public void clear()Clears the region, removing all vertices and triangles.- Specified by:
clearin interfaceCollection<BlockVector3>- Specified by:
clearin interfaceSet<BlockVector3>- Overrides:
clearin classAbstractCollection<BlockVector3>
-
addVertex
Add a vertex to the region.- Parameters:
vertex- the vertex- Returns:
- true, if something changed.
-
isDefined
public boolean isDefined() -
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
-
getCenter
Description copied from interface:RegionGet the center point of a region. Note: Coordinates will not be integers if the corresponding lengths are even.- Specified by:
getCenterin interfaceRegion- Overrides:
getCenterin classAbstractRegion- Returns:
- center point
-
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
-
getVertices
-
getTriangles
-
clone
Description copied from interface:RegionMake a clone of the region.- Specified by:
clonein interfaceRegion- Overrides:
clonein classAbstractRegion- Returns:
- a cloned version
-