geomUtils.Ray
Class
ray
Index
Properties
Methods
create
create a new rayclone
Creates a new ray initialized with values from an existing raycopy
Copy the values from one ray to anotherfromPoints
create a ray from two pointsset
Set the components of a ray to the given valuescomputeHit
Compute hit.
Details
Properties
o
Start point.
meta | description |
---|---|
Type | Vec3 |
Defined in | cocos2d/core/geom-utils/ray.ts:136 |
d
e Direction
meta | description |
---|---|
Type | Vec3 |
Defined in | cocos2d/core/geom-utils/ray.ts:145 |
Methods
create
create a new ray
meta | description |
---|---|
Returns | Ray |
Defined in | cocos2d/core/geom-utils/ray.ts:42 |
Parameters
ox
number The x part of the starting point.oy
number The y part of the starting point.oz
number The z part of the starting point.dx
number X in the direction.dy
number Y in the direction.dz
number Z in the direction.
clone
Creates a new ray initialized with values from an existing ray
meta | description |
---|---|
Returns | Ray |
Defined in | cocos2d/core/geom-utils/ray.ts:60 |
Parameters
a
Ray Clone target
copy
Copy the values from one ray to another
meta | description |
---|---|
Returns | Ray |
Defined in | cocos2d/core/geom-utils/ray.ts:76 |
Parameters
out
Ray Accept the ray of the operation.a
Ray Copied ray.
fromPoints
create a ray from two points
meta | description |
---|---|
Returns | Ray |
Defined in | cocos2d/core/geom-utils/ray.ts:93 |
Parameters
set
Set the components of a ray to the given values
meta | description |
---|---|
Returns | Ray |
Defined in | cocos2d/core/geom-utils/ray.ts:110 |
Parameters
out
Ray Receive the operating ray.ox
number The x part of the starting point.oy
number The y part of the starting point.oz
number The z part of the starting point.dx
number X in the direction.dy
number Y in the direction.dz
number Z in the direction.
computeHit
Compute hit.
meta | description |
---|---|
Defined in | cocos2d/core/geom-utils/ray.ts:174 |