geomUtils.Sphere 类型
模块: cc
轴对齐球。
索引
属性(properties)
方法
create创建一个新的 sphere 实例。clone克隆一个新的 sphere 实例。copy将从一个 sphere 的值复制到另一个 sphere。fromPoints从两个点创建一个新的 sphere。set将球体的属性设置为给定的值。clone获得克隆。copy拷贝对象。getBoundary获取此形状的边界点。transform将 out 根据这个 sphere 的数据进行变换。setScale将 out 根据这个 sphere 的数据进行缩放。
Details
属性(properties)
center
本地坐标的中心点。
| meta | description |
|---|---|
| 类型 | Vec3 |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:126 |
radius
半径。
| meta | description |
|---|---|
| 类型 | number |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:135 |
方法
create
创建一个新的 sphere 实例。
| meta | description |
|---|---|
| 返回 | Sphere |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:43 |
参数列表
cxUnknown X coordinates of the shape relative to the origin.cyUnknown Y coordinates of the shape relative to the origin.czUnknown Z coordinates of the shape relative to the origin.rUnknown Radius of sphere
clone
克隆一个新的 sphere 实例。
| meta | description |
|---|---|
| 返回 | Sphere |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:59 |
参数列表
pSphere The target of cloning.
copy
将从一个 sphere 的值复制到另一个 sphere。
| meta | description |
|---|---|
| 返回 | Sphere |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:72 |
参数列表
outSphere Accept the sphere of operations.aSphere Sphere being copied.
fromPoints
从两个点创建一个新的 sphere。
| meta | description |
|---|---|
| 返回 | Sphere |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:89 |
参数列表
outUnknown Accept the sphere of operations.minPosUnknown The smallest point of sphere.maxPosUnknown The maximum point of sphere.
set
将球体的属性设置为给定的值。
| meta | description |
|---|---|
| 返回 | Sphere |
| 定义于 | cocos2d/core/geom-utils/sphere.ts:106 |
参数列表
outSphere Accept the sphere of operations.cxUnknown X coordinates of the shape relative to the origin.cyUnknown Y coordinates of the shape relative to the origin.czUnknown Z coordinates of the shape relative to the origin.rnumber Radius.
clone
获得克隆。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/sphere.ts:161 |
copy
拷贝对象。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/sphere.ts:172 |
参数列表
aUnknown Copy target.
getBoundary
获取此形状的边界点。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/sphere.ts:184 |
参数列表
transform
将 out 根据这个 sphere 的数据进行变换。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/sphere.ts:198 |
参数列表
mUnknown The transformation matrix.posUnknown The position part of the transformation.rotUnknown The rotating part of the transformation.scaleUnknown The scaling part of the transformation.outUnknown The target of the transformation.
setScale
将 out 根据这个 sphere 的数据进行缩放。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/sphere.ts:227 |
参数列表
scaleUnknown Scale valueoutUnknown Scale target