# 球（[name]）

## 构造函数

### [name]( [param:Vector3 center], [param:Float radius] )

[page:Vector3 center] - 球心的位置，默认值是一个位于(0, 0, 0)的[page:Vector3]。

## 属性

### [property:Vector3 center]

A [page:Vector3]定义了球心的位置，默认值位于(0, 0, 0)。

## 方法

### [method:Sphere applyMatrix4]( [param:Matrix4 matrix] )

[page:Matrix4 matrix] - 将被应用的[Page:Matrix4]矩阵。

### [method:Vector3 clampPoint]( [param:Vector3 point], [param:Vector3 target] )

[page:Vector3 point] - [page:Vector3] 将要夹取的点。
[page:Vector3 target] — 结果将被复制到这个Vector3中。

### [method:Boolean containsPoint]( [param:Vector3 point] )

[page:Vector3 point] - the [page:Vector3] to be checked

### [method:this expandByPoint]( [param:Vector3 point] )

[page:Vector3 point] - [page:Vector3] that should be included in the sphere.

Expands the boundaries of this sphere to include [page:Vector3 point].

### [method:Sphere makeEmpty]()

Makes the sphere empty by setting [page:.center center] to (0, 0, 0) and [page:.radius radius] to -1.

### [method:Box3 getBoundingBox]( [param:Box3 target] )

[page:Box3 target] — 结果将被复制到这个Box3中。

### [method:Boolean intersectsBox]( [param:Box3 box] )

[page:Box3 box] - 将被用于测试是否与这个球有交集的[page:Box3]。

### [method:Boolean intersectsPlane]( [param:Plane plane] )

[page:Plane plane] - 将被用于测试是否与这个球有交集的Plane。

### [method:Boolean intersectsSphere]( [param:Sphere sphere] )

[page:Sphere sphere] - 将被用于测试是否与这个球有交集的Sphere。

### [method:Sphere set]( [param:Vector3 center], [param:Float radius] )

[page:Vector3 center] - 球心位置。

Please note that this method only copies the values from the given center.

### [method:Sphere setFromPoints]( [param:Array points], [param:Vector3 optionalCenter] )

[page:Array points] - 一个包含有[page:Vector3]位置的[page:Array]。
[page:Vector3 optionalCenter] - 可选， [page:Vector3] 球心位置。

### [method:this union]( [param:Sphere sphere] )

[page:Sphere sphere] - Bounding sphere that will be unioned with this sphere.

Expands this sphere to enclose both the original sphere and the given sphere.