BCFTopic
- class Communicator.BCFTopic()
This class contains data corresponding to a BCF file topic.
Constructors
Methods
Constructors
- BCFTopic.constructor(bcfDataId, bcfFilename, topicId, viewer)
- Arguments
bcfDataId (
number()
) –bcfFilename (BCFName) –
topicId (BCFTopicId) –
viewer (
WebViewer()
) –
- Return type
Methods
addMarkup
- BCFTopic.addMarkup(filename, document)
Adds a BCF markup.
- Arguments
filename (
string()
) –document (
Document | null()
) –
- Return type
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
getMarkup
- BCFTopic.getMarkup()
- Return type
- 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
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
filename (
string()
) –snapshot (
BCFSnapshot()
) –
- 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
filename (
string()
) –viewpoint (
BCFViewpoint()
) –
- Return type
void
static createTopic
- BCFTopic.createTopic(viewer, bcfDataId, bcfFilename, topicTitle[, markupView])
Takes a MarkupView and creates a BCF Topic from it.
- Arguments
viewer (
WebViewer()
) –bcfDataId (
number()
) –bcfFilename (BCFName) –
topicTitle (
string()
) –markupView (
MarkupView()
| null) – optional
- Return type
Promise <
BCFTopic()
>