# GeometryBVH

class in `three-mesh-bvh`, extends `BVH`

```js
import { GeometryBVH } from 'three-mesh-bvh';
```

Abstract base class for geometry-backed BVH implementations. Handles geometry
indexing, indirect mode, and bounding box initialization. Subclasses implement
primitive-specific bounds computation and raycasting via `writePrimitiveBounds`
and `raycastObject3D`.

## Constructor

```js
new GeometryBVH( geometry: BufferGeometry, options?: Object )
```

- `geometry`, `BufferGeometry`
- `options`, `Object`, optional
  - `strategy`, `number`, optional, default `CENTER`: Split strategy: `CENTER`, `AVERAGE`, or `SAH`.
  - `maxDepth`, `number`, optional, default `40`: Maximum tree depth. Note that this can cause the target leaf size to not
be met if the tree is truncated.
  - `targetLeafSize`, `number`, optional, default `10`: The target number of primitives per leaf node. Note that this is
a soft limit and generation strategies like SAH will terminate early if the heuristic determines.
  - `setBoundingBox`, `boolean`, optional, default `true`: Set `geometry.boundingBox` if not already present.
  - `useSharedArrayBuffer`, `boolean`, optional, default `false`: Use `SharedArrayBuffer` for BVH root buffers.
  - `indirect`, `boolean`, optional, default `false`: Build using an indirect buffer, leaving the original index unmodified.
  - `verbose`, `boolean`, optional, default `true`: Log build progress to the console.
  - `onProgress`, `function | null`, optional, default `null`: Called with a progress value in [0, 1] during build.
  - `range`, `Object | null`, optional, default `null`: Restrict the BVH to a specific geometry group range.

## Properties

### .indirect: boolean

readonly

Whether the BVH was built in indirect mode.

### .geometry: BufferGeometry

readonly

The geometry this BVH was built from.
