.. role:: ts-api-decorator

############
BCFViewpoint
############

.. js:module:: Bcf
   :noindex:

.. container:: ts-api-section

   .. js:class:: BCFViewpoint



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~Bcf.BCFViewpoint.constructor`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~Bcf.BCFViewpoint.activate`
   * :js:meth:`~Bcf.BCFViewpoint.export`
   * :js:meth:`~Bcf.BCFViewpoint.getCamera`
   * :js:meth:`~Bcf.BCFViewpoint.getClippingPlanes`
   * :js:meth:`~Bcf.BCFViewpoint.getColors`
   * :js:meth:`~Bcf.BCFViewpoint.getColorsToNodes`
   * :js:meth:`~Bcf.BCFViewpoint.getFilename`
   * :js:meth:`~Bcf.BCFViewpoint.getLines`
   * :js:meth:`~Bcf.BCFViewpoint.getSelection`
   * :js:meth:`~Bcf.BCFViewpoint.getSelectionNodes`
   * :js:meth:`~Bcf.BCFViewpoint.getViewpointGuid`
   * :js:meth:`~Bcf.BCFViewpoint.getVisibilityExceptionNodes`
   * :js:meth:`~Bcf.BCFViewpoint.getVisibilityExceptions`
   * :js:meth:`~Bcf.BCFViewpoint.setCamera`
   * :js:meth:`~Bcf.BCFViewpoint.setClippingPlanes`
   * :js:meth:`~Bcf.BCFViewpoint.setColorNodes`
   * :js:meth:`~Bcf.BCFViewpoint.setColors`
   * :js:meth:`~Bcf.BCFViewpoint.setDefaultVisibility`
   * :js:meth:`~Bcf.BCFViewpoint.setLines`
   * :js:meth:`~Bcf.BCFViewpoint.setSelection`
   * :js:meth:`~Bcf.BCFViewpoint.setSelectionNodes`
   * :js:meth:`~Bcf.BCFViewpoint.setVisibilityExceptionNodes`
   * :js:meth:`~Bcf.BCFViewpoint.setVisibilityExceptions`
   * :js:meth:`~Bcf.BCFViewpoint.createViewpoint`





------------

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

.. container:: ts-api-section

   .. js:function:: BCFViewpoint.constructor( filename, document, version, modelBounding, modelUnits, viewer)

      :param filename: None
      :type filename: string
      :param document: None
      :type document: null | Document
      :param version: None
      :type version: BCFVersion
      :param modelBounding: None
      :type modelBounding: Box
      :param modelUnits: None
      :type modelUnits: number
      :param viewer: None
      :type viewer: WebViewer


      :rtype: BCFViewpoint



Methods
=======

.. rst-class:: ts-api-section

activate
--------

.. js:method:: BCFViewpoint.activate()



   Activates viewpoint.
   Sets the camera, visibility, cutting planes, colors, and markup.


   :rtype: Promise <void>

.. rst-class:: ts-api-section

export
------

.. js:method:: BCFViewpoint.export()





   :returns: XML document containing the viewpoint data.


   :rtype: XMLDocument

.. rst-class:: ts-api-section

getCamera
---------

.. js:method:: BCFViewpoint.getCamera()



   Gets the viewpoint camera, or null if none is set.


   :rtype: null | Camera

.. rst-class:: ts-api-section

getClippingPlanes
-----------------

.. js:method:: BCFViewpoint.getClippingPlanes()



   Gets the clipping planes.

   :returns: Array containing position and direction pairs.


   :rtype: [(Point3, Point3)]

.. rst-class:: ts-api-section

getColors
---------

.. js:method:: BCFViewpoint.getColors()





   :returns: Map correlating color to components.


   :rtype: Map <Color, Set <string>>

.. rst-class:: ts-api-section

getColorsToNodes
----------------

.. js:method:: BCFViewpoint.getColorsToNodes()





   :returns: Map correlating color to nodes.


   :rtype: Map <Color, Set <number>>

.. rst-class:: ts-api-section

getFilename
-----------

.. js:method:: BCFViewpoint.getFilename()



   Gets the viewpoint filename.


   :rtype: string

.. rst-class:: ts-api-section

getLines
--------

.. js:method:: BCFViewpoint.getLines()



   Gets markup lines.

   :returns: Array containing start point and end point line pairs.


   :rtype: [(Point3, Point3)]

.. rst-class:: ts-api-section

getSelection
------------

.. js:method:: BCFViewpoint.getSelection()



   Gets a list of generic IDs that are in the selection set.


   :rtype: [string]

.. rst-class:: ts-api-section

getSelectionNodes
-----------------

.. js:method:: BCFViewpoint.getSelectionNodes()



   Gets a list of node IDs that are in the selection set.


   :rtype: [number]

.. rst-class:: ts-api-section

getViewpointGuid
----------------

.. js:method:: BCFViewpoint.getViewpointGuid()



   Gets the GUID associated with the viewpoint.


   :rtype: null | string

.. rst-class:: ts-api-section

getVisibilityExceptionNodes
---------------------------

.. js:method:: BCFViewpoint.getVisibilityExceptionNodes()



   Gets the visibility exception node ids.

   :returns: Array of NodeIds corresponding to components.


   :rtype: [number]

.. rst-class:: ts-api-section

getVisibilityExceptions
-----------------------

.. js:method:: BCFViewpoint.getVisibilityExceptions()



   Gets the visibility exception generic ids.

   :returns: Array of GenericIds corresponding to components.


   :rtype: [string]

.. rst-class:: ts-api-section

setCamera
---------

.. js:method:: BCFViewpoint.setCamera( camera)

   :param camera: None
   :type camera: Camera


   Sets the viewpoint camera.


   :rtype: void

.. rst-class:: ts-api-section

setClippingPlanes
-----------------

.. js:method:: BCFViewpoint.setClippingPlanes( planes)

   :param planes: array containing position and direction pairs.
   :type planes: [(Point3, Point3)]


   Sets the clipping planes.


   :rtype: void

.. rst-class:: ts-api-section

setColorNodes
-------------

.. js:method:: BCFViewpoint.setColorNodes( colorNodeMap)

   :param colorNodeMap: Map correlating color to BfcNodes.
   :type colorNodeMap: Map <Color, Set <BcfNode>>


   Sets the colors.


   :rtype: void

.. rst-class:: ts-api-section

setColors
---------

.. js:method:: BCFViewpoint.setColors( colorGenericIdMap)

   :param colorGenericIdMap: Map correlating color to GenericIds.
   :type colorGenericIdMap: Map <Color, Set <string>>


   Sets the colors.


   :rtype: void

.. rst-class:: ts-api-section

setDefaultVisibility
--------------------

.. js:method:: BCFViewpoint.setDefaultVisibility( defaultVisibility)

   :param defaultVisibility: None
   :type defaultVisibility: boolean


   Sets the default visibility.
   If true, visibility exceptions are hidden.
   If false, visibility exceptions are shown.


   :rtype: void

.. rst-class:: ts-api-section

setLines
--------

.. js:method:: BCFViewpoint.setLines( lines)

   :param lines: array of start point and end point line pairs.
   :type lines: [(Point3, Point3)]


   Sets the markup lines.


   :rtype: void

.. rst-class:: ts-api-section

setSelection
------------

.. js:method:: BCFViewpoint.setSelection( selection)

   :param selection: None
   :type selection: [string]


   Sets a list of items to be added to the selection set.


   :rtype: void

.. rst-class:: ts-api-section

setSelectionNodes
-----------------

.. js:method:: BCFViewpoint.setSelectionNodes( selection)

   :param selection: None
   :type selection: [BcfNode]


   Sets a list of items to be added to the selection set.


   :rtype: void

.. rst-class:: ts-api-section

setVisibilityExceptionNodes
---------------------------

.. js:method:: BCFViewpoint.setVisibilityExceptionNodes( visibilityExceptions)

   :param visibilityExceptions: Array of BcfNodes corresponding to components.
   :type visibilityExceptions: [BcfNode]


   Sets the visibility exceptions. These nodes will be shown or hidden based on the default visibility setting.


   :rtype: void

.. rst-class:: ts-api-section

setVisibilityExceptions
-----------------------

.. js:method:: BCFViewpoint.setVisibilityExceptions( visibilityExceptions)

   :param visibilityExceptions: Array of GenericIds corresponding to components.
   :type visibilityExceptions: [string]


   Sets the visibility exceptions. These nodes will be shown or hidden based on the default visibility setting.


   :rtype: void

.. rst-class:: ts-api-section

:ts-api-decorator:`static` createViewpoint
------------------------------------------

.. js:method:: BCFViewpoint.createViewpoint( viewer, viewpointFilename, markupView)

   :param viewer: None
   :type viewer: WebViewer
   :param viewpointFilename: None
   :type viewpointFilename: string
   :param markupView: None
   :type markupView: null | MarkupView


   :rtype: Promise <BCFViewpoint>

