geomUtils.Ray Class
Module: cc
ray
Index
Properties
Methods
createcreate a new raycloneCreates a new ray initialized with values from an existing raycopyCopy the values from one ray to anotherfromPointscreate a ray from two pointssetSet the components of a ray to the given valuescomputeHitCompute 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
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
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
aRay 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
outRay Accept the ray of the operation.aRay 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
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
Compute hit.
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/ray.ts:174 |