geomUtils.Line 类型
直线
索引
属性(properties)
方法
create创建一个新的 line。clone克隆一个新的 line。copy复制一个线的值到另一个。fromPoints用两个点创建一个线。set将给定线的属性设置为给定值。len计算线的长度。length计算线的长度。
Details
属性(properties)
s
起点。
| meta | description |
|---|---|
| 类型 | Vec3 |
| 定义于 | cocos2d/core/geom-utils/line.ts:147 |
e
终点。
| meta | description |
|---|---|
| 类型 | Vec3 |
| 定义于 | cocos2d/core/geom-utils/line.ts:156 |
方法
create
创建一个新的 line。
| meta | description |
|---|---|
| 返回 | Line |
| 定义于 | cocos2d/core/geom-utils/line.ts:40 |
参数列表
sxNumber The x part of the starting point.syNumber The y part of the starting point.szNumber The z part of the starting point.exNumber The x part of the end point.eyNumber The y part of the end point.ezNumber The z part of the end point.
clone
克隆一个新的 line。
| meta | description |
|---|---|
| 返回 | Line |
| 定义于 | cocos2d/core/geom-utils/line.ts:58 |
参数列表
aLine The source of cloning.
copy
复制一个线的值到另一个。
| meta | description |
|---|---|
| 返回 | Line |
| 定义于 | cocos2d/core/geom-utils/line.ts:74 |
参数列表
outLine The object that accepts the action.aLine The source of the copy.
fromPoints
用两个点创建一个线。
| meta | description |
|---|---|
| 返回 | Line |
| 定义于 | cocos2d/core/geom-utils/line.ts:91 |
参数列表
set
将给定线的属性设置为给定值。
| meta | description |
|---|---|
| 返回 | Line |
| 定义于 | cocos2d/core/geom-utils/line.ts:108 |
参数列表
outLine The object that accepts the action.sxNumber The x part of the starting point.syNumber The y part of the starting point.szNumber The z part of the starting point.exNumber The x part of the end point.eyNumber The y part of the end point.ezNumber The z part of the end point.
len
计算线的长度。
| meta | description |
|---|---|
| 返回 | Number |
| 定义于 | cocos2d/core/geom-utils/line.ts:134 |
参数列表
aLine The line to calculate.
length
计算线的长度。
| meta | description |
|---|---|
| 返回 | Number |
| 定义于 | cocos2d/core/geom-utils/line.ts:184 |