Skip to main content
Version: Next

Class: AssetNodeCollection

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:27

Represents a set of nodes associated with an [asset in Cognite Fusion]https://docs.cognite.com/api/v1/#tag/Assets linked to the 3D model using [asset mappings]https://docs.cognite.com/api/v1/#tag/3D-Asset-Mapping. A node is considered to be part of an asset if it has a direct asset mapping or if one of its ancestors has an asset mapping to the asset.

Extends

Constructors

Constructor

new AssetNodeCollection(client, modelMetadataProvider): AssetNodeCollection

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:37

Parameters

client

CogniteClient

modelMetadataProvider

CdfModelNodeCollectionDataProvider

Returns

AssetNodeCollection

Overrides

NodeCollection.constructor

Properties

classToken

readonly static classToken: "AssetNodeCollection" = 'AssetNodeCollection'

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

Accessors

classToken

Get Signature

get classToken(): string

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

Returns

string

Inherited from

NodeCollection.classToken


isLoading

Get Signature

get isLoading(): boolean

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:44

Returns

boolean

Overrides

NodeCollection.isLoading

Methods

clear()

clear(): void

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:143

Returns

void

Overrides

NodeCollection.clear


executeFilter()

executeFilter(filter): Promise<void>

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:55

Updates the node collection to hold nodes associated with the asset given, or assets within the bounding box or all assets associated with the 3D model.

Parameters

filter
assetId?

number

ID of a single [asset]https://docs.cognite.com/dev/concepts/resource_types/assets.html (optional)

boundingBox?

Box3

When provided, only assets within the provided bounds will be included in the filter.

Returns

Promise<void>


getAreas()

getAreas(): AreaCollection

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:155

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

Returns

AreaCollection

Overrides

NodeCollection.getAreas


getFilter()

getFilter(): undefined | { assetId?: number; boundingBox?: Box3; }

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:139

Returns

undefined | { assetId?: number; boundingBox?: Box3; }


getIndexSet()

getIndexSet(): IndexSet

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:151

Returns

IndexSet

Overrides

NodeCollection.getIndexSet


off()

off(event, listener): void

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

Parameters

event

"changed"

listener

() => void

Returns

void

Inherited from

NodeCollection.off


on()

on(event, listener): void

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

Parameters

event

"changed"

listener

() => void

Returns

void

Inherited from

NodeCollection.on


serialize()

serialize(): SerializedNodeCollection

Defined in: packages/cad-styling/src/AssetNodeCollection.ts:159

Returns

SerializedNodeCollection

Overrides

NodeCollection.serialize