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


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

.. js:class:: wv.Bcf.BCFTopic

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



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


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

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



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


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

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



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

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



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

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



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

      .. rst-class:: sig-pretty-signature
      
         | addViewpoint(**filename**\ : *string*\ , **document**\ : (*None* | *Document*\ ), **version**\ : :js:data:`BCFVersion <wv.Bcf.BCFVersion>`\ , **modelBounding**\ : :js:class:`Box <wv.Box>`\ , **modelUnits**\ : *number*\ ): :js:class:`BCFViewpoint <wv.Bcf.BCFViewpoint>`
      
      Creates and adds BCF viewpoint.
      
      **Parameters**
      
      
         **filename**\ : *string*
      
      
            viewpoint filename.
      
      
         **document**\ : (*None* \| *Document*\ )
      
      
            Viewpoint document.
      
      
         **version**\ : :js:data:`BCFVersion <wv.Bcf.BCFVersion>`
      
      
            Version of the BCF node.
      
      
         **modelBounding**\ : :js:class:`Box <wv.Box>`
      
      
            Viewpoint model bounding box.
      
      
         **modelUnits**\ : *number*
      
      
            Units in which the viewpoint model is defined.
      
      
      
      **Returns**\ : :js:class:`BCFViewpoint <wv.Bcf.BCFViewpoint>`
      



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

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



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

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



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

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



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

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



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

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



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

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



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

      .. rst-class:: sig-pretty-signature
      
         | setSnapshot(**filename**\ : *string*\ , **snapshot**\ : :js:class:`BCFSnapshot <wv.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 <wv.Bcf.BCFSnapshot>`
      
      
      **Returns**\ : *void*
      



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

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




