geomUtils.Line
Class
Module: cc
line
Index
Properties
Methods
create
create a new lineclone
Creates a new line initialized with values from an existing linecopy
Copy the values from one line to anotherfromPoints
create a line from two pointsset
Set the components of a Vec3 to the given valueslen
Calculate the length of the line.length
Calculate the length of the line.
Details
Properties
s
Start points.
meta | description |
---|---|
Type | Vec3 |
Defined in | cocos2d/core/geom-utils/line.ts:147 |
e
End points.
meta | description |
---|---|
Type | Vec3 |
Defined in | cocos2d/core/geom-utils/line.ts:156 |
Methods
create
create a new line
meta | description |
---|---|
Returns | Line |
Defined in | cocos2d/core/geom-utils/line.ts:40 |
Parameters
sx
Number The x part of the starting point.sy
Number The y part of the starting point.sz
Number The z part of the starting point.ex
Number The x part of the end point.ey
Number The y part of the end point.ez
Number The z part of the end point.
clone
Creates a new line initialized with values from an existing line
meta | description |
---|---|
Returns | Line |
Defined in | cocos2d/core/geom-utils/line.ts:58 |
Parameters
a
Line The source of cloning.
copy
Copy the values from one line to another
meta | description |
---|---|
Returns | Line |
Defined in | cocos2d/core/geom-utils/line.ts:74 |
Parameters
out
Line The object that accepts the action.a
Line The source of the copy.
fromPoints
create a line from two points
meta | description |
---|---|
Returns | Line |
Defined in | cocos2d/core/geom-utils/line.ts:91 |
Parameters
set
Set the components of a Vec3 to the given values
meta | description |
---|---|
Returns | Line |
Defined in | cocos2d/core/geom-utils/line.ts:108 |
Parameters
out
Line The object that accepts the action.sx
Number The x part of the starting point.sy
Number The y part of the starting point.sz
Number The z part of the starting point.ex
Number The x part of the end point.ey
Number The y part of the end point.ez
Number The z part of the end point.
len
Calculate the length of the line.
meta | description |
---|---|
Returns | Number |
Defined in | cocos2d/core/geom-utils/line.ts:134 |
Parameters
a
Line The line to calculate.
length
Calculate the length of the line.
meta | description |
---|---|
Returns | Number |
Defined in | cocos2d/core/geom-utils/line.ts:184 |