.. role:: clio-static
   :class: clio-flag clio-flag-static


########
BCFTopic
########

.. js:class:: Bcf.BCFTopic

   This class contains data corresponding to a BCF file topic.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~Bcf.BCFTopic.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~Bcf.BCFTopic.addMarkup`
   * :js:meth:`~Bcf.BCFTopic.addSnapshot`
   * :js:meth:`~Bcf.BCFTopic.addViewpoint`
   * :js:meth:`~Bcf.BCFTopic.getMarkup`
   * :js:meth:`~Bcf.BCFTopic.getSnapshot`
   * :js:meth:`~Bcf.BCFTopic.getSnapshotMap`
   * :js:meth:`~Bcf.BCFTopic.getTopicId`
   * :js:meth:`~Bcf.BCFTopic.getViewpoint`
   * :js:meth:`~Bcf.BCFTopic.getViewpointMap`
   * :js:meth:`~Bcf.BCFTopic.setSnapshot`
   * :js:meth:`~Bcf.BCFTopic.setViewpoint`
   * :js:meth:`~static Bcf.BCFTopic.createTopic`
   
   




Constructors
============

.. js:method:: Bcf.BCFTopic.constructor

   .. rst-class:: sig-pretty-signature
   
      | BCFTopic(**bcfDataId**\ : *number*\ , **bcfFilename**\ : *string*\ , **topicId**\ : *string*\ , **viewer**\ : :js:class:`~IWebViewer`\ ): :js:class:`BCFTopic <Bcf.BCFTopic>`
   
   **Parameters**
   
      **bcfDataId**\ : *number*
   
      **bcfFilename**\ : *string*
   
      **topicId**\ : *string*
   
      **viewer**\ : :js:class:`~IWebViewer`
   
   
   **Returns**\ : :js:class:`BCFTopic <Bcf.BCFTopic>`
   





Methods
=======

.. js:method:: Bcf.BCFTopic.addMarkup

   .. rst-class:: sig-pretty-signature
   
      | addMarkup(**filename**\ : *string*\ , **document**\ : (*None* \| *Document*\ )): :js:class:`BCFMarkup <Bcf.BCFMarkup>`
   
   Adds a BCF markup.
   
   **Parameters**
   
      **filename**\ : *string*
   
      **document**\ : (*None* \| *Document*\ )
   
   
   **Returns**\ : :js:class:`BCFMarkup <Bcf.BCFMarkup>`
   



.. js:method:: Bcf.BCFTopic.addSnapshot

   .. rst-class:: sig-pretty-signature
   
      | addSnapshot(**filename**\ : *string*\ , **png**\ : *Uint8Array*\ ): *void*
   
   Creates and adds a Snapshot.
   
   **Parameters**
   
      **filename**\ : *string*
   
      **png**\ : *Uint8Array*
   
         Image data.
   
   
   
   **Returns**\ : *void*
   



.. js:method:: Bcf.BCFTopic.addViewpoint

   .. rst-class:: sig-pretty-signature
   
      | addViewpoint(**filename**\ : *string*\ , **document**\ : (*None* \| *Document*\ ), **version**\ : :js:data:`BCFVersion <Bcf.BCFVersion>`\ , **modelBounding**\ : :js:class:`~Box`\ , **modelUnits**\ : *number*\ ): :js:class:`BCFViewpoint <Bcf.BCFViewpoint>`
   
   Creates and adds BCF viewpoint.
   
   **Parameters**
   
      **filename**\ : *string*
   
      **document**\ : (*None* \| *Document*\ )
   
      **version**\ : :js:data:`BCFVersion <Bcf.BCFVersion>`
   
      **modelBounding**\ : :js:class:`~Box`
   
      **modelUnits**\ : *number*
   
   
   **Returns**\ : :js:class:`BCFViewpoint <Bcf.BCFViewpoint>`
   



.. js:method:: Bcf.BCFTopic.getMarkup

   .. rst-class:: sig-pretty-signature
   
      | getMarkup(): :js:class:`BCFMarkup <Bcf.BCFMarkup>`
   
   **Returns**\ : :js:class:`BCFMarkup <Bcf.BCFMarkup>`
   
      BCF markup data.
   
   



.. js:method:: Bcf.BCFTopic.getSnapshot

   .. rst-class:: sig-pretty-signature
   
      | getSnapshot(**filename**\ : *string*\ ): (*None* \| :js:class:`BCFSnapshot <Bcf.BCFSnapshot>`\ )
   
   Gets snapshot data.
   
   **Parameters**
   
      **filename**\ : *string*
   
         snapshot or corresponding viewpoint filename
   
   
   
   **Returns**\ : (*None* \| :js:class:`BCFSnapshot <Bcf.BCFSnapshot>`\ )
   



.. js:method:: Bcf.BCFTopic.getSnapshotMap

   .. rst-class:: sig-pretty-signature
   
      | getSnapshotMap(): *Map*
   
   **Returns**\ : *Map*
   
      A map associating snapshot filenames with snapshot data.
   
   



.. js:method:: Bcf.BCFTopic.getTopicId

   .. rst-class:: sig-pretty-signature
   
      | getTopicId(): *string*
   
   Gets the topic id corresponding to the BCF topic folder.
   
   **Returns**\ : *string*
   



.. js:method:: Bcf.BCFTopic.getViewpoint

   .. rst-class:: sig-pretty-signature
   
      | getViewpoint(**filename**\ : *string*\ ): (*None* \| :js:class:`BCFViewpoint <Bcf.BCFViewpoint>`\ )
   
   Gets viewpoint data.
   
   **Parameters**
   
      **filename**\ : *string*
   
         viewpoint filename.
   
   
   
   **Returns**\ : (*None* \| :js:class:`BCFViewpoint <Bcf.BCFViewpoint>`\ )
   



.. js:method:: Bcf.BCFTopic.getViewpointMap

   .. rst-class:: sig-pretty-signature
   
      | getViewpointMap(): *Map*
   
   **Returns**\ : *Map*
   
      A map associating viewpoint filenames with viewpoint data.
   
   



.. js:method:: Bcf.BCFTopic.setSnapshot

   .. rst-class:: sig-pretty-signature
   
      | setSnapshot(**filename**\ : *string*\ , **snapshot**\ : :js:class:`BCFSnapshot <Bcf.BCFSnapshot>`\ ): *void*
   
   Adds a BCF Snapshot. If there is already a snapshot with the smae filename, it will be replaced.
   
   **Parameters**
   
      **filename**\ : *string*
   
      **snapshot**\ : :js:class:`BCFSnapshot <Bcf.BCFSnapshot>`
   
   
   **Returns**\ : *void*
   



.. js:method:: Bcf.BCFTopic.setViewpoint

   .. rst-class:: sig-pretty-signature
   
      | setViewpoint(**filename**\ : *string*\ , **viewpoint**\ : :js:class:`BCFViewpoint <Bcf.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**\ : :js:class:`BCFViewpoint <Bcf.BCFViewpoint>`
   
   
   **Returns**\ : *void*
   



.. js:method:: static Bcf.BCFTopic.createTopic

   .. rst-class:: clio-flags
   
      :clio-static:`static`
   
   .. rst-class:: sig-pretty-signature
   
      | createTopic(**viewer**\ : :js:class:`~IWebViewer`\ , **bcfDataId**\ : *number*\ , **bcfFilename**\ : *string*\ , **topicTitle**\ : *string*\ , **markupView**\ : (*None* \| :js:class:`MarkupView <Markup.MarkupView>`\ )?): *Promise*
   
   Takes a MarkupView and creates a BCF Topic from it.
   
   **Parameters**
   
      **viewer**\ : :js:class:`~IWebViewer`
   
      **bcfDataId**\ : *number*
   
      **bcfFilename**\ : *string*
   
      **topicTitle**\ : *string*
   
      **markupView**\ : (*None* \| :js:class:`MarkupView <Markup.MarkupView>`\ ) = null
   
   
   **Returns**\ : *Promise*
   





