Beta
Readonly
capacityReturn the 'capacity' of the bounding rectangle which represents the collection of volumes in the stack
Readonly
volumeReturn the number of volumes (positive and negative) in the volume stack
Fetch a Block Location Iterator for the Compound Block Volume. This iterator will allow a creator to iterate across all of the selected volumes within the larger bounding area. Areas of a volume which have been overridden by a subtractive volume will not be included in the iterator step. (i.e. if you push a cube to the stack, and then push a subtractive volume to the same location, then the iterator will step over the initial volume because it is considered negative space)
This function can't be called in read-only mode.
Get the largest bounding box that represents a container for all of the volumes on the stack
This function can't be called in read-only mode.
block location to test
Return a boolean representing whether or not a given block location is inside a positive block volume. E.g. if the stack contains a large cube followed by a slightly smaller negative cube, and the test location is within the negative cube - the function will return false because it's not 'inside' a volume (it IS inside the bounding rectangle, but it is not inside a positively defined location)
This function can't be called in read-only mode.
Returns undefined if the stack is empty
Inspect the last entry pushed to the volume stack without affecting the stack contents
This function can't be called in read-only mode.
Item to push to the end of the stack
Push a volume item to the stack. The volume item contains an 'action' parameter which determines whether this volume is a positive or negative space
This function can't be called in read-only mode.
Item to add or replace
If the volume stack is empty, this function will push the specified item to the stack. If the volume stack is NOT empty, this function will replace the last item on the stack with the new item.
This function can't be called in read-only mode.
Amount to move
Move the root block location of the volume by a given amount. This effectively adds the specified delta to the block location of all of the volumes in the stack
This function can't be called in read-only mode.
The Compound Block Volume is a collection of individual block volume definitions which, as a collection, define a larger volume of (sometimes non-contiguous) irregular shapes. This class is loosely based on the concept of CSG (Computational Solid Geometry) and allows a user to create complex volumes by building a stack of volumes and voids to make a larger single volume. For example - normally a creator would create a hollow cube by creating 6 "wall" surfaces for each face. With a Compound Block Volume, a creator can define a hollow cube by creating a single outer solid cube, and then defining a further single 'void' cube inside the larger one. Similarly, the Compound Block Volume can represent irregular shaped volumes (e.g. a tree consists of a trunk and lots of leaf cubes which are not necessarily contiguously placed)