.. role:: ts-api-decorator

#####
Model
#####

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: Model

      Common interface for all models.



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~cee.Model.constructor`



.. container:: api-index-section

   .. rubric:: Properties

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

   * :js:attr:`~cee.Model.name`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.Model.getBoundingBox`
   * :js:meth:`~cee.Model.getDefaultCameraConfig`





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

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

.. container:: ts-api-section

   .. js:function:: Model.constructor()



      :rtype: Model



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: Model.name

      :type: string

      Name of the model. 

      Mainly used for debugging.



Methods
=======

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

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

.. js:method:: Model.getBoundingBox([ options])

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


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

   When called without any parameters this method will return the current bounding box of the model, including only
   visible parts/objects. For models that support it, the full bounding box can may queried by specifying the 
   optional ``ModelBoundingBoxOptions`` and setting ``ModelBoundingBoxOptions.includeHiddenParts`` to true.


   :rtype: BoundingBox

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

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

.. js:method:: Model.getDefaultCameraConfig()



   Can return an optional default camera configuration for this model.

   If a model returns a default camera config, any views displaying the model may utilize the information to do first-time
   setup of their camera. The camera config will not have any effect on views where the camera has already been set by the user.
   If multiple models are shown in the same view, the first model with a default camera config will take precedence.


   :rtype: CameraConfig

