T
- element-type, either an object-mask or has an object-mask representation.public interface AccessObjectMask<T>
The purpose is to allow both ObjectMask
and other types that may contain a ObjectMask
to be scaled, with generic functions providing access and creation to/from the
object-mask representation.
Modifier and Type | Method and Description |
---|---|
default BoundingBox |
boundingBoxFor(T element)
A bounding-box for a given element.
|
T |
clipTo(T element,
Extent extent)
Ensures the element lies within a certain extent.
|
T |
createFrom(int index,
ObjectMask object)
Creates an element of type
T from an object-representation and index. |
ObjectMask |
objectFor(T element)
An object-mask for a given element.
|
T |
shiftBy(T element,
ReadableTuple3i quantity)
Positionally-shifts an element by a given quantity in the positive direction.
|
ObjectMask objectFor(T element)
This operation is assumed to involve negligible computational cost.
element
- the element.T shiftBy(T element, ReadableTuple3i quantity)
element
- the element to shift by.quantity
- the quantity to shift by.element
but positionally-shifted.T clipTo(T element, Extent extent)
element
- the element.extent
- the extent to clip to.T createFrom(int index, ObjectMask object)
T
from an object-representation and index.index
- the index of the object-representation in terms of the original list.object
- an object-representation corresponding to this index.default BoundingBox boundingBoxFor(T element)
This operation is assumed to involve negligible computational cost.
element
- the element.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.