.. role:: ts-api-decorator

###########
StreamModel
###########

.. js:module:: cee.vs
   :noindex:

.. todo:: Implement None cee.vs.StreamModel ('target')

.. container:: api-index-section

   .. rubric:: Accessors

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

   * :js:attr:`~cee.vs.StreamModel.currentFrameIndex`
   * :js:attr:`~cee.vs.StreamModel.frameCount`
   * :js:attr:`~cee.vs.StreamModel.name`
   * :js:attr:`~cee.vs.StreamModel.publishTag`
   * :js:attr:`~cee.vs.StreamModel.streamId`
   * :js:attr:`~cee.vs.StreamModel.streamRevision`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.vs.StreamModel.addConfigReadyCallback`
   * :js:meth:`~cee.vs.StreamModel.addConfigReadyCallbackForRevision`
   * :js:meth:`~cee.vs.StreamModel.addStreamingCompleteCallback`
   * :js:meth:`~cee.vs.StreamModel.addStreamingCompleteCallbackForRevision`
   * :js:meth:`~cee.vs.StreamModel.detachFromSession`
   * :js:meth:`~cee.vs.StreamModel.getBoundingBox`
   * :js:meth:`~cee.vs.StreamModel.getDefaultCameraConfig`
   * :js:meth:`~cee.vs.StreamModel.isStreamingActive`
   * :js:meth:`~cee.vs.StreamModel.isStreamingComplete`
   * :js:meth:`~cee.vs.StreamModel.pollForStreamConfig_async`
   * :js:meth:`~cee.vs.StreamModel.rayIntersect`
   * :js:meth:`~cee.vs.StreamModel.removeAllConfigReadyCallbacks`
   * :js:meth:`~cee.vs.StreamModel.removeAllStreamingCompleteCallbacks`
   * :js:meth:`~cee.vs.StreamModel.setGuidingCamera`
   * :js:meth:`~cee.vs.StreamModel.startStreaming_async`
   * :js:meth:`~cee.vs.StreamModel.stopStreaming`





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

Accessors
=========

.. container:: ts-api-section

   .. js:function:: StreamModel.currentFrameIndex()



      Gets/sets the current frame index displayed in this model.


      :rtype: number

   .. js:function:: StreamModel.currentFrameIndex( frameIndex)

      :param frameIndex: None
      :type frameIndex: number


      :rtype: void



.. container:: ts-api-section

   .. js:function:: StreamModel.frameCount()



      Gets the number of frames in this model.


      :rtype: number



.. container:: ts-api-section

   .. js:function:: StreamModel.name()



      Name of the model, primarily used for debugging.


      :rtype: string

   .. js:function:: StreamModel.name( name)

      :param name: None
      :type name: string


      Name of the model. 

      Mainly used for debugging.


      :rtype: void



.. container:: ts-api-section

   .. js:function:: StreamModel.publishTag()



      The publishTag associated with the current stream config or null if no publishTag was set.


      :rtype: string



.. container:: ts-api-section

   .. js:function:: StreamModel.streamId()



      The stream id of the stream being consumed by this model


      :rtype: string



.. container:: ts-api-section

   .. js:function:: StreamModel.streamRevision()



      The current streamRevision of the stream being consumed by this model, or undefined if no stream
      config has been received yet.


      :rtype: number



Methods
=======

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

addConfigReadyCallback
----------------------

.. js:method:: StreamModel.addConfigReadyCallback( callback)

   :param callback: None
   :type callback: ConfigReadyCallback


   :rtype: void

.. js:method:: StreamModel.addConfigReadyCallback( options, callback)
   :noindex:

   :param options: None
   :type options: CallbackOptions
   :param callback: None
   :type callback: ConfigReadyCallback


   :rtype: void

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

addConfigReadyCallbackForRevision
---------------------------------

.. js:method:: StreamModel.addConfigReadyCallbackForRevision( streamRevision, callback)

   :param streamRevision: None
   :type streamRevision: number
   :param callback: None
   :type callback: RevisionBoundConfigReadyCallback


   :rtype: void

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

addStreamingCompleteCallback
----------------------------

.. js:method:: StreamModel.addStreamingCompleteCallback( callback)

   :param callback: None
   :type callback: StreamingCompleteCallback


   :rtype: void

.. js:method:: StreamModel.addStreamingCompleteCallback( options, callback)
   :noindex:

   :param options: None
   :type options: CallbackOptions
   :param callback: None
   :type callback: StreamingCompleteCallback


   :rtype: void

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

addStreamingCompleteCallbackForRevision
---------------------------------------

.. js:method:: StreamModel.addStreamingCompleteCallbackForRevision( streamRevision, callback)

   :param streamRevision: None
   :type streamRevision: number
   :param callback: None
   :type callback: RevisionBoundStreamingCompleteCallback


   :rtype: void

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

detachFromSession
-----------------

.. js:method:: StreamModel.detachFromSession()



   Detaches the model from its owner server session.
   This will permanently stop streaming of the model.


   :rtype: void

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

getBoundingBox
--------------

.. js:method:: StreamModel.getBoundingBox([ _options])

   :param _options: :ts-api-decorator:`optional` None
   :type _options: ModelBoundingBoxOptions


   Returns the ``BoundingBox`` (in world coordinates) of the current contents of the model

   Note that this method does not support any ``ModelBoundingBoxOptions``


   :rtype: BoundingBox

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

getDefaultCameraConfig
----------------------

.. js:method:: StreamModel.getDefaultCameraConfig()



   Returns default camera configuration, which is always null for this model.


   :rtype: unknown

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

isStreamingActive
-----------------

.. js:method:: StreamModel.isStreamingActive()



   Checks whether the streaming to the model is enabled or not.


   :rtype: boolean

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

isStreamingComplete
-------------------

.. js:method:: StreamModel.isStreamingComplete()



   :rtype: boolean

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

pollForStreamConfig_async
-------------------------

.. js:method:: StreamModel.pollForStreamConfig_async()



   Polls for new data for this model.


   :rtype: Promise <void>

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

rayIntersect
------------

.. js:method:: StreamModel.rayIntersect( ray)

   :param ray: None
   :type ray: Ray


   Performs picking on the model using the current frame. Returns null when nothing is hit.


   :rtype: HitItem

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

removeAllConfigReadyCallbacks
-----------------------------

.. js:method:: StreamModel.removeAllConfigReadyCallbacks()



   :rtype: void

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

removeAllStreamingCompleteCallbacks
-----------------------------------

.. js:method:: StreamModel.removeAllStreamingCompleteCallbacks()



   :rtype: void

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

setGuidingCamera
----------------

.. js:method:: StreamModel.setGuidingCamera( camera)

   :param camera: None
   :type camera: Camera


   Sets the guiding camera by watching its changes and using it to guide the streaming.


   :rtype: void

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

startStreaming_async
--------------------

.. js:method:: StreamModel.startStreaming_async()



   Starts the streaming from the VizStreamer Service.


   :rtype: Promise <boolean>

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

stopStreaming
-------------

.. js:method:: StreamModel.stopStreaming()



   Stops the streaming from the VizStreamer Service.


   :rtype: void

