BCFTopic

class Communicator.BCFTopic()

This class contains data corresponding to a BCF file topic.

Constructors


Constructors

BCFTopic.constructor(bcfDataId, bcfFilename, topicId, viewer)
Arguments
Return type

BCFTopic()

Methods

addMarkup

BCFTopic.addMarkup(filename, document)

Adds a BCF markup.

Arguments
  • filename (string()) –

  • document (Document | null()) –

Return type

BCFMarkup()

addSnapshot

BCFTopic.addSnapshot(filename, png)

Creates and adds a Snapshot.

Arguments
  • filename (string()) –

  • png (Uint8Array()) – Image data.

Return type

void

addViewpoint

BCFTopic.addViewpoint(filename, document, version, modelBounding, modelUnits)

Creates and adds BCF viewpoint.

Arguments
  • filename (string()) –

  • document (Document | null()) –

  • version (BCFVersion) –

  • modelBounding (Box()) –

  • modelUnits (number()) –

Return type

BCFViewpoint()

getMarkup

BCFTopic.getMarkup()
Return type

BCFMarkup()

Returns

BCF markup data.

getSnapshot

BCFTopic.getSnapshot(filename)

Gets snapshot data.

Arguments
  • filename (string()) – snapshot or corresponding viewpoint filename

Return type

BCFSnapshot() | null

getSnapshotMap

BCFTopic.getSnapshotMap()
Return type

Map <string, BCFSnapshot()>

Returns

A map associating snapshot filenames with snapshot data.

getTopicId

BCFTopic.getTopicId()

Gets the topic id corresponding to the BCF topic folder.

Return type

BCFTopicId

getViewpoint

BCFTopic.getViewpoint(filename)

Gets viewpoint data.

Arguments
  • filename (string()) – viewpoint filename.

Return type

BCFViewpoint() | null

getViewpointMap

BCFTopic.getViewpointMap()
Return type

Map <string, BCFViewpoint()>

Returns

A map associating viewpoint filenames with viewpoint data.

setSnapshot

BCFTopic.setSnapshot(filename, snapshot)

Adds a BCF Snapshot. If there is already a snapshot with the smae filename, it will be replaced.

Arguments
Return type

void

setViewpoint

BCFTopic.setViewpoint(filename, viewpoint)

Adds a BCF Viewpoint. If there is a already a viewpoint with the same filename, it will be replaced.

Arguments
Return type

void

static createTopic

BCFTopic.createTopic(viewer, bcfDataId, bcfFilename, topicTitle[, markupView])

Takes a MarkupView and creates a BCF Topic from it.

Arguments
Return type

Promise <BCFTopic()>