Skip to main content
Version: 3.x

Class: ClusteredAreaCollection

@cognite/reveal.ClusteredAreaCollection

AreaCollection that stores a representative box set by merging inserted boxes that are overlapping or close to each other. It uses simple heuristics to determine which boxes are to be merged.

Implements

Constructors

constructor

new ClusteredAreaCollection()

Accessors

isEmpty

get isEmpty(): boolean

Returns

boolean

Implementation of

AreaCollection.isEmpty

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:16

Methods

addAreas

addAreas(boxes): void

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

Parameters

NameType
boxesIterable<Box3>

Returns

void

Implementation of

AreaCollection.addAreas

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:34


areas

areas(): Generator<Box3, any, unknown>

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, any, unknown>

Implementation of

AreaCollection.areas

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:20


intersectWith

intersectWith(boxes): void

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

NameType
boxesIterable<Box3>

Returns

void

Implementation of

AreaCollection.intersectWith

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:38


intersectsBox

intersectsBox(box): boolean

Return whether the input box intersects the AreaCollection.

Parameters

NameType
boxBox3

Returns

boolean

Implementation of

AreaCollection.intersectsBox

Defined in

packages/cad-styling/src/prioritized/ClusteredAreaCollection.ts:24