# Class: Spherical

球面坐标系。

## Table of contents

### Constructors

- constructor

### Properties

- center
- isSpherical
- phi
- radius
- theta
- EPS

### Methods

- clone
- copy
- makeSafe
- set
- setFromCartesianCoords
- setFromVector3
- toVector3

## Constructors

### constructor

• **new Spherical**(`radius?`, `phi?`, `theta?`)

#### Parameters

| Name | Type |
| :------ | :------ |
| `radius?` | `number` |
| `phi?` | `number` |
| `theta?` | `number` |

## Properties

### center

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

球面球心。

___

### isSpherical

• **isSpherical**: `boolean` = `true`

___

### phi

• **phi**: `number`

点在球面上的横向旋转角度。

___

### radius

• **radius**: `number`

球面半径。

___

### theta

• **theta**: `number`

点在球面上的纵向旋转角度。

___

### EPS

▪ `Static` **EPS**: `number` = `0.000001`

## Methods

### clone

▸ **clone**(): [`Spherical`](Spherical)

#### Returns

[`Spherical`](Spherical)

___

### copy

▸ **copy**(`other`): [`Spherical`](Spherical)

#### Parameters

| Name | Type |
| :------ | :------ |
| `other` | [`Spherical`](Spherical) |

#### Returns

[`Spherical`](Spherical)

___

### makeSafe

▸ **makeSafe**(): [`Spherical`](Spherical)

restrict phi to be between EPS and PI-EPS。

#### Returns

[`Spherical`](Spherical)

___

### set

▸ **set**(`radius`, `phi`, `theta`): [`Spherical`](Spherical)

#### Parameters

| Name | Type |
| :------ | :------ |
| `radius` | `number` |
| `phi` | `number` |
| `theta` | `number` |

#### Returns

[`Spherical`](Spherical)

___

### setFromCartesianCoords

▸ **setFromCartesianCoords**(`x`, `y`, `z`): [`Spherical`](Spherical)

从笛卡尔坐标系的x、y、z转换。

#### Parameters

| Name | Type |
| :------ | :------ |
| `x` | `number` |
| `y` | `number` |
| `z` | `number` |

#### Returns

[`Spherical`](Spherical)

___

### setFromVector3

▸ **setFromVector3**(`vector`): [`Spherical`](Spherical)

从笛卡尔坐标系的Vector3转换。

#### Parameters

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

#### Returns

[`Spherical`](Spherical)

___

### toVector3

▸ **toVector3**(`vector?`): [`Vector3`](Vector3)

转换到笛卡尔坐标系的Vector3。

#### Parameters

| Name | Type |
| :------ | :------ |
| `vector?` | [`Vector3`](Vector3) |

#### Returns

[`Vector3`](Vector3)
