.. role:: clio-static
   :class: clio-flag clio-flag-static


####################
RaySphereIntersector
####################

.. js:class:: cee.RaySphereIntersector

   Helper class for computing the intersection between a ray and number of points with a given threshold (the radius).
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.RaySphereIntersector.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~static cee.RaySphereIntersector.findAllIntersectedSpheresOrderedByDistanceToRay`
   * :js:meth:`~static cee.RaySphereIntersector.findClosestIntersectedSphereToRay`
   
   



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

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


.. js:method:: cee.RaySphereIntersector.constructor

      .. rst-class:: sig-pretty-signature
      
         | RaySphereIntersector(): :js:class:`RaySphereIntersector <cee.RaySphereIntersector>`
      
      **Returns**\ : :js:class:`RaySphereIntersector <cee.RaySphereIntersector>`
      



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

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


.. js:method:: static cee.RaySphereIntersector.findAllIntersectedSpheresOrderedByDistanceToRay

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | findAllIntersectedSpheresOrderedByDistanceToRay(**ray**\ : :js:class:`Ray <cee.Ray>`\ , **radius**\ : *number*\ , **pointsArr**\ : *ArrayLike*\ ): { index: *number*\ , l2Distance: *number* }[]
      
      Find all the points (spheres) intersected by the ray, and return them ordered by the distance to the Ray (closest first).
      
      The spheres are defined with a radius and an array of points in the pointsArr array
      
      The pointsArr array contains a number of sphere centers in a 1d array: <s1.x, s1.y, s1.z, s2.x, s2.y, s2.z> ...
      
      **Parameters**
      
      
         **ray**\ : :js:class:`Ray <cee.Ray>`
      
         **radius**\ : *number*
      
         **pointsArr**\ : *ArrayLike*
      
      
      **Returns**\ : { index: *number*\ , l2Distance: *number* }[]
      



.. js:method:: static cee.RaySphereIntersector.findClosestIntersectedSphereToRay

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | findClosestIntersectedSphereToRay(**ray**\ : :js:class:`Ray <cee.Ray>`\ , **radius**\ : *number*\ , **pointsArr**\ : *ArrayLike*\ ): *number*
      
      Returns the index of the closest intersected sphere to the ray
      
      The spheres are defined with a radius and an array of points in the pointsArr array
      
      The pointsArr array contains a number of sphere centers in a 1d array: <s1.x, s1.y, s1.z, s2.x, s2.y, s2.z> ...
      
      **Parameters**
      
      
         **ray**\ : :js:class:`Ray <cee.Ray>`
      
         **radius**\ : *number*
      
         **pointsArr**\ : *ArrayLike*
      
      
      **Returns**\ : *number*
      




