BCFTopic

class Communicator.BCFTopic()

This class contains data corresponding to a BCF file topic.

Constructors


Constructors

constructor

Communicator.BCFTopic.constructor(bcfDataId, bcfFilename, topicId, viewer)
Arguments
  • bcfDataId (number()) –

  • bcfFilename (Communicator.BCFName()) –

  • topicId (Communicator.BCFTopicId()) –

  • viewer (Communicator.WebViewer()) –

Return type

Communicator.BCFTopic

Methods

addMarkup

Communicator.BCFTopic.addMarkup(filename, document)

Adds a BCF markup.

Arguments
  • filename (string()) –

  • document ({  }()) –

Return type

Communicator.BCFMarkup

addSnapshot

Communicator.BCFTopic.addSnapshot(filename, png)

Creates and adds a Snapshot.

Arguments
  • filename (string()) –

  • png (Uint8Array()) – Image data.

Return type

void

addViewpoint

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

Creates and adds BCF viewpoint.

Arguments
  • filename (string()) –

  • document ({  }()) –

  • version (Communicator.BCFVersion()) –

  • modelBounding (Communicator.Box()) –

  • modelUnits (number()) –

Return type

Communicator.BCFViewpoint

getMarkup

Communicator.BCFTopic.getMarkup()
Return type

Communicator.BCFMarkup

Returns

BCF markup data.

getSnapshot

Communicator.BCFTopic.getSnapshot(filename)

Gets snapshot data.

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

Return type

{  }

getSnapshotMap

Communicator.BCFTopic.getSnapshotMap()
Return type

Map[string, Communicator.BCFSnapshot]

Returns

A map associating snapshot filenames with snapshot data.

getTopicId

Communicator.BCFTopic.getTopicId()

Gets the topic id corresponding to the BCF topic folder.

Return type

Communicator.BCFTopicId

getViewpoint

Communicator.BCFTopic.getViewpoint(filename)

Gets viewpoint data.

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

Return type

{  }

getViewpointMap

Communicator.BCFTopic.getViewpointMap()
Return type

Map[string, Communicator.BCFViewpoint]

Returns

A map associating viewpoint filenames with viewpoint data.

setSnapshot

Communicator.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

Communicator.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

createTopic

Communicator.BCFTopic.createTopic(viewer, bcfDataId, bcfFilename, topicTitle, markupView)

Takes a MarkupView and creates a BCF Topic from it.

Arguments
  • viewer (Communicator.WebViewer()) –

  • bcfDataId (number()) –

  • bcfFilename (Communicator.BCFName()) –

  • topicTitle (string()) –

  • markupView ({  }()) –

Return type

Promise[Communicator.BCFTopic]