Class: ListBlockVolume
blockBeta
由唯一方块位置的无序容器组成的体积。
Volume composed of an unordered container of unique block locations.
Extends
Constructors
Constructor
new ListBlockVolume(
locations):ListBlockVolume
Beta
Parameters
locations
Vector3[]
用于构造 ListBlockVolume 的初始方块位置数组。
Initial array of block locations that ListBlockVolume will be constructed with.
Returns
ListBlockVolume
Remarks
创建 ListBlockVolume 的新实例。
Creates a new instance of ListBlockVolume.
Overrides
BlockVolumeBase.constructor
Methods
add()
add(
locations):void
Beta
Parameters
locations
Vector3[]
要添加到容器中的方块位置数组。
Array of block locations to be inserted into container.
Returns
void
Remarks
将方块位置插入容器中。
Insert block locations into container.
getBlockLocationIterator()
getBlockLocationIterator():
BlockLocationIterator
Beta
Returns
Remarks
获取一个 BlockLocationIterator,表示指定体积内的所有方块世界位置。
Fetch a BlockLocationIterator that represents all of the block world locations within the specified volume
Inherited from
BlockVolumeBase.getBlockLocationIterator
getBoundingBox()
getBoundingBox():
BlockBoundingBox
Beta
Returns
Remarks
返回一个 BlockBoundingBox 对象,表示体积的有效最小和最大坐标。
Return a BlockBoundingBox object which represents the validated min and max coordinates of the volume
Throws
This function can throw errors.
Inherited from
BlockVolumeBase.getBoundingBox
getCapacity()
getCapacity():
number
Beta
Returns
number
Remarks
返回 BlockVolume 的容量(体积)(WDH)。
Return the capacity (volume) of the BlockVolume (WDH)
Inherited from
getClosest()
getClosest(
count,location):Vector3[]
Beta
Parameters
count
number
要返回的最接近位置的数量。
Number of closest positions to return
location
测量距离的位置。
Position to measure distance from
Returns
Vector3[]
Remarks
返回体积内最接近给定位置的方块位置列表,按距离排序(最近优先)。
Returns a list of block positions within the volume that are closest to a given location, sorted by distance (nearest first)
Throws
This function can throw errors.
Inherited from
getFarthest()
getFarthest(
count,location):Vector3[]
Beta
Parameters
count
number
要返回的最远位置的数量。
Number of farthest positions to return
location
测量距离的位置。
Position to measure distance from
Returns
Vector3[]
Remarks
返回体积内距离给定位置最远的方块位置列表,按距离排序(最远优先)。
Returns a list of block positions within the volume that are farthest from a given location, sorted by distance (farthest first)
Throws
This function can throw errors.
Inherited from
getMax()
getMax():
Vector3
Beta
Returns
Remarks
获取体积的最大角点位置(保证 >= min)。
Get the largest corner position of the volume (guaranteed to be >= min)
Throws
This function can throw errors.
Inherited from
getMin()
getMin():
Vector3
Beta
Returns
Remarks
获取体积的最小角点位置(保证 <= max)。
Get the smallest corner position of the volume (guaranteed to be <= max)
Throws
This function can throw errors.
Inherited from
getSpan()
getSpan():
Vector3
Beta
Returns
Remarks
获取一个 Vector3 对象,其中每个分量表示沿该轴的方块数量。
Get a Vector3 object where each component represents the number of blocks along that axis
Inherited from
isInside()
isInside(
location):boolean
Beta
Parameters
location
Returns
boolean
Remarks
检查给定的世界方块位置是否在 BlockVolume 内部。
Check to see if a given world block location is inside a BlockVolume
Inherited from
remove()
remove(
locations):void
Beta
Parameters
locations
Vector3[]
要从容器中移除的方块位置数组。
Array of block locations to be removed from container.
Returns
void
Remarks
从容器中移除方块位置。
Remove block locations from container.
translate()
translate(
delta):void
Beta
Parameters
delta
移动的方块数量。
Amount of blocks to move by
Returns
void
Remarks
按指定量移动 BlockVolume。
Move a BlockVolume by a specified amount
