geomUtils.Ray 类型
模块: cc
射线。
索引
属性(properties)
方法
create创建一条射线。clone从一条射线克隆出一条新的射线。copy将从一个 ray 的值复制到另一个 ray。fromPoints用两个点创建一条射线。set将给定射线的属性设置为给定的值。computeHit
Details
属性(properties)
o
起点。
| meta | description |
|---|---|
| 类型 | Vec3 |
| 定义于 | cocos2d/core/geom-utils/ray.ts:136 |
d
e Direction 方向。
| meta | description |
|---|---|
| 类型 | Vec3 |
| 定义于 | cocos2d/core/geom-utils/ray.ts:145 |
方法
create
创建一条射线。
| meta | description |
|---|---|
| 返回 | Ray |
| 定义于 | cocos2d/core/geom-utils/ray.ts:42 |
参数列表
oxnumber The x part of the starting point.oynumber The y part of the starting point.oznumber The z part of the starting point.dxnumber X in the direction.dynumber Y in the direction.dznumber Z in the direction.
clone
从一条射线克隆出一条新的射线。
| meta | description |
|---|---|
| 返回 | Ray |
| 定义于 | cocos2d/core/geom-utils/ray.ts:60 |
参数列表
aRay Clone target
copy
将从一个 ray 的值复制到另一个 ray。
| meta | description |
|---|---|
| 返回 | Ray |
| 定义于 | cocos2d/core/geom-utils/ray.ts:76 |
参数列表
outRay Accept the ray of the operation.aRay Copied ray.
fromPoints
用两个点创建一条射线。
| meta | description |
|---|---|
| 返回 | Ray |
| 定义于 | cocos2d/core/geom-utils/ray.ts:93 |
参数列表
set
将给定射线的属性设置为给定的值。
| meta | description |
|---|---|
| 返回 | Ray |
| 定义于 | cocos2d/core/geom-utils/ray.ts:110 |
参数列表
outRay Receive the operating ray.oxnumber The x part of the starting point.oynumber The y part of the starting point.oznumber The z part of the starting point.dxnumber X in the direction.dynumber Y in the direction.dznumber Z in the direction.
computeHit
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/ray.ts:174 |