.. role:: ts-api-decorator

#################
CuttingPlaneUtils
#################

.. js:module:: cee.ug
   :noindex:

.. container:: ts-api-section

   .. js:class:: CuttingPlaneUtils

      Helper functions for cutting planes



.. container:: api-index-section

   .. rubric:: Constructors

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

   * :js:meth:`~cee.ug.CuttingPlaneUtils.constructor`



.. container:: api-index-section

   .. rubric:: Methods

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

   * :js:meth:`~cee.ug.CuttingPlaneUtils.getPositionFromRelativeNormalPosition`
   * :js:meth:`~cee.ug.CuttingPlaneUtils.getRelativeNormalPosition`





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

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

.. container:: ts-api-section

   .. js:function:: CuttingPlaneUtils.constructor()



      :rtype: CuttingPlaneUtils



Methods
=======

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

:ts-api-decorator:`static` getPositionFromRelativeNormalPosition
----------------------------------------------------------------

.. js:method:: CuttingPlaneUtils.getPositionFromRelativeNormalPosition( relVal, normal, boundingBox)

   :param relVal: The relative value to get the position for (0..1)
   :type relVal: number
   :param normal: The normal direction to compute the position in
   :type normal: Vec3Like
   :param boundingBox: The bounding box defining the range of positions for the point (usually the model bounding box)
   :type boundingBox: BoundingBox


   Gets a position from a relative position along the given normal on the given bounding box.

   This is useful for implementing a slider moving the cutting plane back and forth in the direction of 
   the plane's normal vector.


   :rtype: Vec3

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

:ts-api-decorator:`static` getRelativeNormalPosition
----------------------------------------------------

.. js:method:: CuttingPlaneUtils.getRelativeNormalPosition( point, normal, boundingBox)

   :param point: The point to compute the relative position for
   :type point: Vec3Like
   :param normal: The normal direction to use for the computation
   :type normal: Vec3Like
   :param boundingBox: The bounding box defining the range of positions for the point (usually the model bounding box)
   :type boundingBox: BoundingBox


   Gets a relative position along the given normal and bounding box for the given point

   Useful for updating the slider position based on the current position of a cutting plane.


   :rtype: number

