Skip to main content
Version: Next

Class: NodeIdNodeCollection

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

Collection that holds a set of nodes including children identified by nodeIds. Note that this involves remapping IDs to "tree indices" and subtree sized used by Reveal using the CDF API. Its often better to use one of the other node collections or

See​

whenever possible for best performance.

Extends​

Constructors​

Constructor​

new NodeIdNodeCollection(client, model): NodeIdNodeCollection

Defined in: packages/cad-styling/src/NodeIdNodeCollection.ts:26

Parameters​

client​

CogniteClient

model​

CdfModelNodeCollectionDataProvider

Returns​

NodeIdNodeCollection

Overrides​

CdfNodeCollectionBase.constructor

Properties​

classToken​

readonly static classToken: "NodeIdNodeCollection" = 'NodeIdNodeCollection'

Defined in: packages/cad-styling/src/NodeIdNodeCollection.ts:19

Accessors​

classToken​

Get Signature​

get classToken(): string

Defined in: packages/cad-styling/src/NodeCollection.ts:24

Returns​

string

Inherited from​

CdfNodeCollectionBase.classToken


isLoading​

Get Signature​

get isLoading(): boolean

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

Returns​

boolean

Inherited from​

CdfNodeCollectionBase.isLoading

Methods​

clear()​

clear(): void

Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:69

Clears the node collection and interrupts any ongoing operations.

Returns​

void

Inherited from​

CdfNodeCollectionBase.clear


executeFilter()​

executeFilter(nodeIds): Promise<void>

Defined in: packages/cad-styling/src/NodeIdNodeCollection.ts:38

Populates the collection with the nodes with the IDs provided. All children of the nodes are also included in the collection.

Parameters​

nodeIds​

number[]

IDs of nodes to include in the collection.

Returns​

Promise<void>

Promise that resolves when the collection is populated.


getAreas()​

getAreas(): AreaCollection

Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:81

Returns areas surrounding the nodes in the collection. The areas are boxes in "ThreeJS coordinates". Note that not all implementations supports this.

Returns​

AreaCollection

Inherited from​

CdfNodeCollectionBase.getAreas


getIndexSet()​

getIndexSet(): IndexSet

Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:77

Returns​

IndexSet

Inherited from​

CdfNodeCollectionBase.getIndexSet


off()​

off(event, listener): void

Defined in: packages/cad-styling/src/NodeCollection.ts:33

Parameters​

event​

"changed"

listener​

() => void

Returns​

void

Inherited from​

CdfNodeCollectionBase.off


on()​

on(event, listener): void

Defined in: packages/cad-styling/src/NodeCollection.ts:28

Parameters​

event​

"changed"

listener​

() => void

Returns​

void

Inherited from​

CdfNodeCollectionBase.on


serialize()​

serialize(): SerializedNodeCollection

Defined in: packages/cad-styling/src/NodeIdNodeCollection.ts:59

Returns​

SerializedNodeCollection

Overrides​

CdfNodeCollectionBase.serialize


deserialize()​

static deserialize(descriptor, context): Promise<NodeIdNodeCollection>

Defined in: packages/cad-styling/src/NodeIdNodeCollection.ts:66

Parameters​

descriptor​

SerializedNodeCollection

context​

NodeCollectionSerializationContext

Returns​

Promise<NodeIdNodeCollection>