# Class: BoundBall

## Table of contents

### Constructors

- constructor

### Properties

- OFFSETS

### Accessors

- center
- radius

### Methods

- initByPointRadius
- initByPoints
- setValue
- createFromCenterAndRadius

## Constructors

### constructor

• **new BoundBall**(`raw?`, `offset?`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `raw?` | `Float32Array` |
| `offset?` | `number` |

## Properties

### OFFSETS

▪ `Static` `Readonly` **OFFSETS**: `Readonly`

## Accessors

### center

• `get` **center**(): [`Vector3`](Vector3)

包围球中心

**`memberof`** BoundBall

#### Returns

[`Vector3`](Vector3)

• `set` **center**(`val`): `void`

包围球中心

#### Parameters

| Name | Type |
| :------ | :------ |
| `val` | [`Vector3`](Vector3) |

#### Returns

`void`

___

### radius

• `get` **radius**(): `number`

包围球半径

**`memberof`** BoundBall

#### Returns

`number`

• `set` **radius**(`val`): `void`

包围球半径

#### Parameters

| Name | Type |
| :------ | :------ |
| `val` | `number` |

#### Returns

`void`

## Methods

### initByPointRadius

▸ **initByPointRadius**(`center`, `radius`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `center` | [`Vector3`](Vector3) |
| `radius` | `number` |

#### Returns

`void`

___

### initByPoints

▸ **initByPoints**(`points`): [`BoundBall`](BoundBall)

使用一系列点初始化

**`memberof`** BoundBall

#### Parameters

| Name | Type |
| :------ | :------ |
| `points` | [`Vector3`](Vector3)[] |

#### Returns

[`BoundBall`](BoundBall)

自身

___

### setValue

▸ **setValue**(`center`, `radius`): [`BoundBall`](BoundBall)

设置值

**`memberof`** BoundBall

#### Parameters

| Name | Type |
| :------ | :------ |
| `center` | [`Vector3`](Vector3) |
| `radius` | `number` |

#### Returns

[`BoundBall`](BoundBall)

___

### createFromCenterAndRadius

▸ `Static` **createFromCenterAndRadius**(`center`, `radius`): [`BoundBall`](BoundBall)

使用中心和半径创建包围球

**`static`**

**`memberof`** BoundBall

#### Parameters

| Name | Type |
| :------ | :------ |
| `center` | [`Vector3`](Vector3) |
| `radius` | `number` |

#### Returns

[`BoundBall`](BoundBall)
