> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs contain multiple Speckle product experiences. For Speckle 2026.9, prefer /next/ pages for the topics and changes they cover. The navigation label Current does not override this version-specific precedence.
> Coverage under /next/ is incremental. Use Current documentation for unchanged topics and when a /next/ page says coverage is unavailable or explicitly refers you to Current. Do not infer a feature was removed from a missing page.
> Read the page-specific documentation status, applicability, affected guidance and replacement links in agent-only content. Impacted, changed and superseded apply only to the stated scope; they do not mean the entire feature is deprecated. Historical connector guides apply only to the legacy connector described.
> Match guidance to the customer's deployment version, model data format and connector. Respect plan, permission and compatibility restrictions. If an unknown version or data format changes the answer, ask a focused clarification; do not infer deployment version from the date alone.

# Intersections

> Entry point for intersecting and obtaining intersection data from the scene. Accessible from [_SpeckleRenderer_](/developers/viewer/speckle-renderer-api)

## Methods

### intersect

```typescript theme={null}
intersect(
    scene: Scene,
    camera: Camera,
    point: Vector2,
    castLayers: ObjectLayers.STREAM_CONTENT_MESH,
    nearest?: boolean,
    bounds?: Box3,
    firstOnly?: boolean,
    tasOnly?: boolean
  ): Array<ExtendedMeshIntersection> | null

intersect(
    scene: Scene,
    camera: Camera,
    point: Vector2,
    castLayers?: Array<ObjectLayers>,
    nearest?: boolean,
    bounds?: Box3,
    firstOnly?: boolean,
    tasOnly?: boolean
  ): Array<ExtendedIntersection> | null
```

Scene intersect function.

<Tip>
  All intersect calls from this class will use the available acceleration structures. This makes the
  intersection **significantly** faster than using your own three.js raycasters.
</Tip>

Parameters:

* **scene**: [*Scene*](https://threejs.org/docs/index.html?q=scene#api/en/scenes/Scene)
* **camera**: [*Camera*](https://threejs.org/docs/index.html?q=camera#api/en/cameras/Camera)
* **point**: The NDC point to cast the ray from
* **castLayers**: The [*ObjectLayers*](/developers/viewer/viewer-api#objectlayers) enabled on the raycaster
* **nearest**: If the results should be sorted by dinstance. i.e nearest first
* **bounds**: An optional bounds where the intersecting takes place. Everything outside this bounds is disregarded from the result list
  for this cast. Any object outside of these layers is disregarded from intersection
* **firstOnly**: When this flag is enabled the acceleration structure will stop traversing after encountering the first intersection. Only applies to meshes
* **tasOnly**: When this flag is enabled, onyl the TAS will be intersected. Can be combined with `firstOnly` if wanted
  **Returns**: Array\< Intersection > Three.js defined intersection

### intersectRay

```typescript theme={null}
intersectRay(
    scene: Scene,
    camera: Camera,
    ray: Ray,
    castLayers: ObjectLayers.STREAM_CONTENT_MESH,
    nearest?: boolean,
    bounds?: Box3,
    firstOnly?: boolean,
    tasOnly?: boolean
  ): Array<ExtendedMeshIntersection> | null
intersectRay(
    scene: Scene,
    camera: Camera,
    ray: Ray,
    castLayers?: Array<ObjectLayers>,
    nearest?: boolean,
    bounds?: Box3,
    firstOnly?: boolean,
    tasOnly?: boolean
  ): Array<ExtendedIntersection> | null
```

Scene intersect function using a provided Ray.

<Tip>
  All intersect calls from this class will use the available acceleration structures. This makes the
  intersection **significantly** faster than using your own three.js raycasters.
</Tip>

Parameters:

* **scene**: [*Scene*](https://threejs.org/docs/index.html?q=scene#api/en/scenes/Scene)
* **camera**: [*Camera*](https://threejs.org/docs/index.html?q=camera#api/en/cameras/Camera)
* **ray**: The ray to use for casting
* **castLayers**: The [*ObjectLayers*](/developers/viewer/viewer-api#objectlayers) enabled on the raycaster
* **nearest**: If the results should be sorted by dinstance. i.e nearest first
* **bounds**: An optional bounds where the intersecting takes place. Everything outside this bounds is disregarded from the result list
  for this cast. Any object outside of these layers is disregarded from intersection
* **firstOnly**: When this flag is enabled the acceleration structure will stop traversing after encountering the first intersection. Only applies to meshes
* **tasOnly**: When this flag is enabled, onyl the TAS will be intersected. Can be combined with `firstOnly` if wanted
  **Returns**: Array\< Intersection > Three.js defined intersection

## Typedefs

### ExtendedIntersection

```typescript theme={null}
interface ExtendedIntersection extends Intersection {
  batchObject?: BatchObject
  pointOnLine?: Material
}
```

Extension of three.js's default Intersection.

### ExtendedMeshIntersection

```typescript theme={null}
interface ExtendedMeshIntersection extends MeshIntersection {
  batchObject: BatchObject
  object: SpeckleMesh | SpeckleInstancedMesh
}
```

### MeshIntersection

```typescript theme={null}
interface MeshIntersection extends Intersection {
  face: Face
  faceIndex: number
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.