# RaySphereIntersector

class `cee.``RaySphereIntersector`()

  Helper class for computing the intersection between a ray and number of points with a given threshold (the radius).

Constructors

- `constructor`

Methods

- `findAllIntersectedSpheresOrderedByDistanceToRay`
- `findClosestIntersectedSphereToRay`

## Constructors

`RaySphereIntersector.``constructor`()

  Return type: | RaySphereIntersector

## Methods

### static findAllIntersectedSpheresOrderedByDistanceToRay

`RaySphereIntersector.``findAllIntersectedSpheresOrderedByDistanceToRay`(ray, radius, pointsArr)

  Arguments: | ray (`Ray`) – None radius (`number`) – None pointsArr (`ArrayLike`) – None

  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> …

  Return type: | [function]

### static findClosestIntersectedSphereToRay

`RaySphereIntersector.``findClosestIntersectedSphereToRay`(ray, radius, pointsArr)

  Arguments: | ray (`Ray`) – None radius (`number`) – None pointsArr (`ArrayLike`) – None

  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> …

  Return type: | number

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Web in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...