
################
MeshInstanceData
################

.. js:class:: wv.MeshInstanceData

   Object representing a Mesh instance that will be created by the client at run time. This class allows for the specification of instance specific properties of a mesh.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.MeshInstanceData.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wv.MeshInstanceData.overlayId`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.MeshInstanceData.clear`
   * :js:meth:`~wv.MeshInstanceData.copy`
   * :js:meth:`~wv.MeshInstanceData.getCreationFlags`
   * :js:meth:`~wv.MeshInstanceData.getFaceColor`
   * :js:meth:`~wv.MeshInstanceData.getInstanceName`
   * :js:meth:`~wv.MeshInstanceData.getLineColor`
   * :js:meth:`~wv.MeshInstanceData.getLineOpacity`
   * :js:meth:`~wv.MeshInstanceData.getMatrix`
   * :js:meth:`~wv.MeshInstanceData.getMeshId`
   * :js:meth:`~wv.MeshInstanceData.getOpacity`
   * :js:meth:`~wv.MeshInstanceData.getOverlayIndex`
   * :js:meth:`~wv.MeshInstanceData.getPointColor`
   * :js:meth:`~wv.MeshInstanceData.getPointOpacity`
   * :js:meth:`~wv.MeshInstanceData.setCreationFlags`
   * :js:meth:`~wv.MeshInstanceData.setFaceColor`
   * :js:meth:`~wv.MeshInstanceData.setInstanceName`
   * :js:meth:`~wv.MeshInstanceData.setLineColor`
   * :js:meth:`~wv.MeshInstanceData.setLineOpacity`
   * :js:meth:`~wv.MeshInstanceData.setMatrix`
   * :js:meth:`~wv.MeshInstanceData.setMeshId`
   * :js:meth:`~wv.MeshInstanceData.setOpacity`
   * :js:meth:`~wv.MeshInstanceData.setOverlayIndex`
   * :js:meth:`~wv.MeshInstanceData.setPointColor`
   * :js:meth:`~wv.MeshInstanceData.setPointOpacity`
   
   



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

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


.. js:method:: wv.MeshInstanceData.constructor

      .. rst-class:: sig-pretty-signature
      
         | MeshInstanceData(**meshId**\ : (*None* | :js:data:`MeshId <wv.Sc.MeshId>`\ ), **matrix**\ : (*None* | :js:class:`Matrix <wv.Matrix>`\ ), **instanceName**\ : (*None* | *string*\ ), **faceColor**\ : (*None* | :js:class:`Color <wv.Color>`\ ), **lineColor**\ : (*None* | :js:class:`Color <wv.Color>`\ ), **pointColor**\ : (*None* | :js:class:`Color <wv.Color>`\ ), **creationFlags**\ : (*None* | :js:data:`MeshInstanceCreationFlags <wv.MeshInstanceCreationFlags>`\ )): :js:class:`MeshInstanceData <wv.MeshInstanceData>`
      
      Creates a new MeshInstanceData object.
      
      **Parameters**
      
      
         **meshId**\ : (*None* \| :js:data:`MeshId <wv.Sc.MeshId>`\ )
      
      
            the [[MeshId]] of the mesh to instantiate
      
      
         **matrix**\ : (*None* \| :js:class:`Matrix <wv.Matrix>`\ )
      
      
            a matrix that will be applied to this instance
      
      
         **instanceName**\ : (*None* \| *string*\ )
      
      
            a name that will be visible when querying the model hierarchy
      
      
         **faceColor**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
            the color for faces of this instance
      
      
         **lineColor**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
            the color for lines of this instance
      
      
         **pointColor**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
            the color for points of this instance
      
      
         **creationFlags**\ : (*None* \| :js:data:`MeshInstanceCreationFlags <wv.MeshInstanceCreationFlags>`\ )
      
      
            additional options that can be used to alter the behavior of this instance
      
      
      
      **Returns**\ : :js:class:`MeshInstanceData <wv.MeshInstanceData>`
      



.. rst-class:: kind-group kind-properties

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


.. js:data:: wv.MeshInstanceData.overlayId

      .. rst-class:: sig-pretty-signature
      
         | overlayId: :js:class:`OverlayId <wv.Sc.OverlayId>`
      
      The overlay for this instance.
      



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

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


.. js:method:: wv.MeshInstanceData.clear

      .. rst-class:: sig-pretty-signature
      
         | clear(): *void*
      
      Resets all fields of this object.
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.copy

      .. rst-class:: sig-pretty-signature
      
         | copy(): :js:class:`MeshInstanceData <wv.MeshInstanceData>`
      
      Creates a copy of this MeshInstanceData.
      
      **Returns**\ : :js:class:`MeshInstanceData <wv.MeshInstanceData>`
      
      
         Copy of this MeshInstanceData object.
      
      



.. js:method:: wv.MeshInstanceData.getCreationFlags

      .. rst-class:: sig-pretty-signature
      
         | getCreationFlags(): :js:data:`MeshInstanceCreationFlags <wv.MeshInstanceCreationFlags>`
      
      Gets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight...)
      
      **Returns**\ : :js:data:`MeshInstanceCreationFlags <wv.MeshInstanceCreationFlags>`
      
      
         the mesh instance creation flags (null if none set)
      
      



.. js:method:: wv.MeshInstanceData.getFaceColor

      .. rst-class:: sig-pretty-signature
      
         | getFaceColor(): (*None* | :js:class:`Color <wv.Color>`\ )
      
      Gets the color for face elements in this instance.
      
      **Returns**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
         the color for face elements.
      
      



.. js:method:: wv.MeshInstanceData.getInstanceName

      .. rst-class:: sig-pretty-signature
      
         | getInstanceName(): (*None* | *string*\ )
      
      Gets the name that will be applied to the instance.
      
      **Returns**\ : (*None* \| *string*\ )
      
      
         the instance name.
      
      



.. js:method:: wv.MeshInstanceData.getLineColor

      .. rst-class:: sig-pretty-signature
      
         | getLineColor(): (*None* | :js:class:`Color <wv.Color>`\ )
      
      Gets the color for line elements in this instance.
      
      **Returns**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
         the color for line elements.
      
      



.. js:method:: wv.MeshInstanceData.getLineOpacity

      .. rst-class:: sig-pretty-signature
      
         | getLineOpacity(): *number*
      
      Gets the line opacity value for this instance.
      
      **Returns**\ : *number*
      
      
         the line opacity value for this instance.
      
      



.. js:method:: wv.MeshInstanceData.getMatrix

      .. rst-class:: sig-pretty-signature
      
         | getMatrix(): (*None* | :js:class:`Matrix <wv.Matrix>`\ )
      
      Gets the matrix to apply to this instance.
      
      **Returns**\ : (*None* \| :js:class:`Matrix <wv.Matrix>`\ )
      
      
         the current matrix that will be applied to this instance upon creation.
      
      



.. js:method:: wv.MeshInstanceData.getMeshId

      .. rst-class:: sig-pretty-signature
      
         | getMeshId(): (*None* | :js:data:`MeshId <wv.Sc.MeshId>`\ )
      
      Gets the [[MeshId]] of the mesh to use for this instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].
      
      **Returns**\ : (*None* \| :js:data:`MeshId <wv.Sc.MeshId>`\ )
      
      
         the mesh ID to use for this instance.
      
      



.. js:method:: wv.MeshInstanceData.getOpacity

      .. rst-class:: sig-pretty-signature
      
         | getOpacity(): *number*
      
      Gets the face opacity value for this instance.
      
      **Returns**\ : *number*
      
      
         the face opacity value for this instance.
      
      



.. js:method:: wv.MeshInstanceData.getOverlayIndex

      .. rst-class:: sig-pretty-signature
      
         | getOverlayIndex(): *number*
      
      Gets the overlay index for this instance.
      
      **Deprecated**
      
      
         use [[overlayId]] instead.
      
      
      **Returns**\ : *number*
      
      
         the overlay index for this instance, but not the associated view.
      
      



.. js:method:: wv.MeshInstanceData.getPointColor

      .. rst-class:: sig-pretty-signature
      
         | getPointColor(): (*None* | :js:class:`Color <wv.Color>`\ )
      
      Gets the color for point elements in this instance.
      
      **Returns**\ : (*None* \| :js:class:`Color <wv.Color>`\ )
      
      
         the color for point elements.
      
      



.. js:method:: wv.MeshInstanceData.getPointOpacity

      .. rst-class:: sig-pretty-signature
      
         | getPointOpacity(): *number*
      
      Gets the point opacity value for this instance.
      
      **Returns**\ : *number*
      
      
         the point opacity value for this instance.
      
      



.. js:method:: wv.MeshInstanceData.setCreationFlags

      .. rst-class:: sig-pretty-signature
      
         | setCreationFlags(**flags**\ : :js:data:`MeshInstanceCreationFlags <wv.MeshInstanceCreationFlags>`\ ): *void*
      
      Sets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight...)
      
      **Parameters**
      
      
         **flags**\ : :js:data:`MeshInstanceCreationFlags <wv.MeshInstanceCreationFlags>`
      
      
            creation flags
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setFaceColor

      .. rst-class:: sig-pretty-signature
      
         | setFaceColor(**faceColor**\ : :js:class:`Color <wv.Color>`\ ): *void*
      
      Sets the color for face elements in this instance.
      
      **Parameters**
      
      
         **faceColor**\ : :js:class:`Color <wv.Color>`
      
      
            the color to apply to face elements.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setInstanceName

      .. rst-class:: sig-pretty-signature
      
         | setInstanceName(**instanceName**\ : *string*\ ): *void*
      
      Sets the name that will be assigned to this instance. This name will be visible when querying the model hierarchy.
      
      **Parameters**
      
      
         **instanceName**\ : *string*
      
      
            the name to assign to this instance.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setLineColor

      .. rst-class:: sig-pretty-signature
      
         | setLineColor(**lineColor**\ : :js:class:`Color <wv.Color>`\ ): *void*
      
      Sets the color for line elements in this instance.
      
      **Parameters**
      
      
         **lineColor**\ : :js:class:`Color <wv.Color>`
      
      
            the color to apply to line elements.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setLineOpacity

      .. rst-class:: sig-pretty-signature
      
         | setLineOpacity(**lineOpacity**\ : *number*\ ): *void*
      
      Sets the line opacity for this instance.
      
      **Parameters**
      
      
         **lineOpacity**\ : *number*
      
      
            opacity value to set.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setMatrix

      .. rst-class:: sig-pretty-signature
      
         | setMatrix(**matrix**\ : :js:class:`Matrix <wv.Matrix>`\ ): *void*
      
      Sets the matrix that will be applied to this instance.
      
      **Parameters**
      
      
         **matrix**\ : :js:class:`Matrix <wv.Matrix>`
      
      
            the matrix to apply.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setMeshId

      .. rst-class:: sig-pretty-signature
      
         | setMeshId(**meshId**\ : :js:data:`MeshId <wv.Sc.MeshId>`\ ): *void*
      
      Sets the [[MeshId]] of the mesh to use for the instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].
      
      **Parameters**
      
      
         **meshId**\ : :js:data:`MeshId <wv.Sc.MeshId>`
      
      
            the [[MeshId]] to use.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setOpacity

      .. rst-class:: sig-pretty-signature
      
         | setOpacity(**faceOpacity**\ : *number*\ ): *void*
      
      Sets the face opacity for this instance.
      
      **Parameters**
      
      
         **faceOpacity**\ : *number*
      
      
            opacity value to set.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setOverlayIndex

      .. rst-class:: sig-pretty-signature
      
         | setOverlayIndex(**overlayIndex**\ : *number*\ ): *void*
      
      Sets the overlay index for this instance but doesn't change the associated view.
      
      **Deprecated**
      
      
         use [[overlayId]] instead.
      
      
      **Parameters**
      
      
         **overlayIndex**\ : *number*
      
      
            overlay index to set.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setPointColor

      .. rst-class:: sig-pretty-signature
      
         | setPointColor(**pointColor**\ : :js:class:`Color <wv.Color>`\ ): *void*
      
      Sets the color for point elements in this instance.
      
      **Parameters**
      
      
         **pointColor**\ : :js:class:`Color <wv.Color>`
      
      
            the color to apply to point elements.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.MeshInstanceData.setPointOpacity

      .. rst-class:: sig-pretty-signature
      
         | setPointOpacity(**pointOpacity**\ : *number*\ ): *void*
      
      Sets the point opacity for this instance.
      
      **Parameters**
      
      
         **pointOpacity**\ : *number*
      
      
            opacity value to set.
      
      
      
      **Returns**\ : *void*
      




