
########
Clipping
########

.. js:class:: cee.Clipping

   Manages general clipping planes in a View.
   
   Anything behind (on the opposite side of the plane normal) the given planes is hidden.
   
   Note: The ug.RemoteModel has clipping support connect to cutting planes. These are handled separately, and the clipping planes for cutting planes will not show up here.
   
   **Bounded clipping planes**
   
   EnvisionWeb supports bounded clipping planes. This allows for cutting out parts of the model in many different ways. By default a clipping plane will clip an object/fragment if it is behind the specified plane (on the opposite side of the plane normal).
   Bounded clipping planes can be created by assigning all the wanted planes the same group ID when adding them, and then setting the clipping criteria for the group to ClippingCriteria.BehindAllPlanes.
   
   You can access the clipping object with the :js:func:`View.clipping <cee.View.clipping>` property.
   
   
   Index
   =====
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.Clipping.planeCount`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.Clipping.addPlane`
   * :js:meth:`~cee.Clipping.getGroupId`
   * :js:meth:`~cee.Clipping.getPlane`
   * :js:meth:`~cee.Clipping.getPlaneArray`
   * :js:meth:`~cee.Clipping.removeAllPlanes`
   * :js:meth:`~cee.Clipping.removePlane`
   * :js:meth:`~cee.Clipping.setGroupClippingCriteria`
   * :js:meth:`~cee.Clipping.setPlane`
   
   



.. rst-class:: kind-group kind-accessors

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


.. js:method:: cee.Clipping.planeCount

      .. rst-class:: sig-pretty-signature
      
         | *get* planeCount(): *number*
      
      The number of clipping planes in the view
      
      **Returns**\ : *number*
      



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

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


.. js:method:: cee.Clipping.addPlane

      .. rst-class:: sig-pretty-signature
      
         | addPlane(**plane**\ : :js:class:`Plane <cee.Plane>`\ , **groupId**\ : *number*\ ?): *void*
      
      Adds a clipping plane to the view.
      
      By default the plane clips anything behind the plane (on the opposite side of the plane normal). This can be changed by specifying the clipping criteria for the plane group to which this plane belongs using :js:meth:`Clipping.setGroupClippingCriteria <cee.Clipping.setGroupClippingCriteria>`
      
      **Parameters**
      
      
         **plane**\ : :js:class:`Plane <cee.Plane>`
      
         **groupId**\ : *number* = -1
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.Clipping.getGroupId

      .. rst-class:: sig-pretty-signature
      
         | getGroupId(**index**\ : *number*\ ): *number*
      
      Return the group id of the plane at the specified  index
      
      **Parameters**
      
      
         **index**\ : *number*
      
      
      **Returns**\ : *number*
      



.. js:method:: cee.Clipping.getPlane

      .. rst-class:: sig-pretty-signature
      
         | getPlane(**index**\ : *number*\ ): :js:class:`Plane <cee.Plane>`
      
      Return the Plane at the given index
      
      **Parameters**
      
      
         **index**\ : *number*
      
      
      **Returns**\ : :js:class:`Plane <cee.Plane>`
      



.. js:method:: cee.Clipping.getPlaneArray

      .. rst-class:: sig-pretty-signature
      
         | getPlaneArray(): readonly  :js:class:`Plane <cee.Plane>`\ []
      
      Returns a readonly array of all the planes in the view
      
      **Returns**\ : readonly  :js:class:`Plane <cee.Plane>`\ []
      



.. js:method:: cee.Clipping.removeAllPlanes

      .. rst-class:: sig-pretty-signature
      
         | removeAllPlanes(): *void*
      
      Removes all clipping planes in the view
      
      Also clears any plane groups and clipping criteria that has been specified
      
      **Returns**\ : *void*
      



.. js:method:: cee.Clipping.removePlane

      .. rst-class:: sig-pretty-signature
      
         | removePlane(**index**\ : *number*\ ): *void*
      
      Remove the clipping plane at the given index
      
      **Parameters**
      
      
         **index**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.Clipping.setGroupClippingCriteria

      .. rst-class:: sig-pretty-signature
      
         | setGroupClippingCriteria(**groupId**\ : *number*\ , **groupClippingCriteria**\ : :js:data:`ClippingCriteria <cee.ClippingCriteria>`\ ): *void*
      
      Sets clipping criteria for the specified group of planes
      
      **Parameters**
      
      
         **groupId**\ : *number*
      
         **groupClippingCriteria**\ : :js:data:`ClippingCriteria <cee.ClippingCriteria>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.Clipping.setPlane

      .. rst-class:: sig-pretty-signature
      
         | setPlane(**index**\ : *number*\ , **plane**\ : :js:class:`Plane <cee.Plane>`\ ): *void*
      
      Sets a clipping plane at the given index.
      
      By default the plane clips anything behind the plane (on the opposite side of the plane normal).
      
      **Parameters**
      
      
         **index**\ : *number*
      
         **plane**\ : :js:class:`Plane <cee.Plane>`
      
      
      **Returns**\ : *void*
      




