BCFTopic

class wv.Bcf.BCFTopic()

This class contains data corresponding to a BCF file topic.

Constructors

wv.Bcf.BCFTopic.constructor()
BCFTopic(bcfDataId: number, bcfFilename: string, topicId: string, viewer: IWebViewer): BCFTopic

Parameters

bcfDataId: number

bcfFilename: string

topicId: string

viewer: IWebViewer

Returns: BCFTopic

Methods

static wv.Bcf.BCFTopic.createTopic()

static

createTopic(viewer: IWebViewer, bcfDataId: number, bcfFilename: string, topicTitle: string, markupView: (None | MarkupView)?): Promise

Takes a MarkupView and creates a BCF Topic from it.

Parameters

viewer: IWebViewer

bcfDataId: number

bcfFilename: string

topicTitle: string

markupView: (None | MarkupView) = null

Returns: Promise

wv.Bcf.BCFTopic.addMarkup()
addMarkup(filename: string, document: (None | Document)): BCFMarkup

Adds a BCF markup.

Parameters

filename: string

BCF markup filename.

document: (None | Document)

BCF markup document.

Returns: BCFMarkup

wv.Bcf.BCFTopic.addSnapshot()
addSnapshot(filename: string, png: Uint8Array): void

Creates and adds a Snapshot.

Parameters

filename: string

Snapshot filename.

png: Uint8Array

Image data.

Returns: void

wv.Bcf.BCFTopic.addViewpoint()
addViewpoint(filename: string, document: (None | Document), version: BCFVersion, modelBounding: Box, modelUnits: number): BCFViewpoint

Creates and adds BCF viewpoint.

Parameters

filename: string

viewpoint filename.

document: (None | Document)

Viewpoint document.

version: BCFVersion

Version of the BCF node.

modelBounding: Box

Viewpoint model bounding box.

modelUnits: number

Units in which the viewpoint model is defined.

Returns: BCFViewpoint

wv.Bcf.BCFTopic.getMarkup()
getMarkup(): BCFMarkup

Returns: BCFMarkup

BCF markup data.
wv.Bcf.BCFTopic.getSnapshot()
getSnapshot(filename: string): (None | BCFSnapshot)

Gets snapshot data.

Parameters

filename: string

snapshot or corresponding viewpoint filename

Returns: (None | BCFSnapshot)

wv.Bcf.BCFTopic.getSnapshotMap()
getSnapshotMap(): Map

Returns: Map

A map associating snapshot filenames with snapshot data.
wv.Bcf.BCFTopic.getTopicId()
getTopicId(): string

Gets the topic id corresponding to the BCF topic folder.

Returns: string

wv.Bcf.BCFTopic.getViewpoint()
getViewpoint(filename: string): (None | BCFViewpoint)

Gets viewpoint data.

Parameters

filename: string

viewpoint filename.

Returns: (None | BCFViewpoint)

wv.Bcf.BCFTopic.getViewpointMap()
getViewpointMap(): Map

Returns: Map

A map associating viewpoint filenames with viewpoint data.
wv.Bcf.BCFTopic.setSnapshot()
setSnapshot(filename: string, snapshot: BCFSnapshot): void

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

Parameters

filename: string

snapshot: BCFSnapshot

Returns: void

wv.Bcf.BCFTopic.setViewpoint()
setViewpoint(filename: string, viewpoint: BCFViewpoint): void

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

Parameters

filename: string

viewpoint: BCFViewpoint

Returns: void