Skip to main content
Version: Next

Interface: AreaCollection

Defined in: packages/cad-styling/src/prioritized/AreaCollection.ts:17

Represents a collection of areas/axis-aligned bounding boxes for use e.g. for load prioritization. Implementations are not expected to store all areas inserted with addAreas, but rather some "representative box set" covering the inserted areas. Performance will be better the fewer boxes the representative set contains, while the effectiveness of node prioritization will suffer if the representative set covers too much area that is not part of the inserted boxes

Properties

isEmpty

readonly isEmpty: boolean

Defined in: packages/cad-styling/src/prioritized/AreaCollection.ts:18

Methods

addAreas()

addAreas(boxes): void

Defined in: packages/cad-styling/src/prioritized/AreaCollection.ts:36

Add areas to be covered by the representative set of this AreaCollection.

Parameters

boxes

Iterable<Box3>

Returns

void


areas()

areas(): Generator<Box3>

Defined in: packages/cad-styling/src/prioritized/AreaCollection.ts:25

Return some set of boxes that cover the boxes inserted with addAreas. It is required that each inserted box is completely covered by some subset of boxes in the set returned from areas

Returns

Generator<Box3>


intersectsBox()

intersectsBox(box): boolean

Defined in: packages/cad-styling/src/prioritized/AreaCollection.ts:30

Return whether the input box intersects the AreaCollection.

Parameters

box

Box3

Returns

boolean


intersectWith()

intersectWith(boxes): void

Defined in: packages/cad-styling/src/prioritized/AreaCollection.ts:45

Alter the representative set to cover only the intersection between the representative set of this AreaCollection and the incoming boxes. Note that the intersection of two representative sets A' and B' that represent the original box sets A and B will cover the intersection between A and B, and will thus be a valid representative set for the intersection of A and B.

Parameters

boxes

Iterable<Box3>

Returns

void