geomUtils.Sphere Class
Sphere.
Index
Properties
Methods
createcreate a new spherecloneclone a new spherecopycopy the values from one sphere to anotherfromPointscreate a new bounding sphere from two corner pointssetSet the components of a sphere to the given valuescloneClone.copyCopy spheregetBoundaryGet the bounding points of this shapetransformTransform this shapesetScaleScale out based on the sphere data.
Details
Properties
center
The center of the local coordinate.
| meta | description |
|---|---|
| Type | Vec3 |
| Defined in | cocos2d/core/geom-utils/sphere.ts:126 |
radius
| meta | description |
|---|---|
| Type | number |
| Defined in | cocos2d/core/geom-utils/sphere.ts:135 |
Methods
create
create a new sphere
| meta | description |
|---|---|
| Returns | Sphere |
| Defined in | cocos2d/core/geom-utils/sphere.ts:43 |
Parameters
cxUnknown X coordinates of the shape relative to the origin.cyUnknown Y coordinates of the shape relative to the origin.czUnknown Z coordinates of the shape relative to the origin.rUnknown Radius of sphere
clone
clone a new sphere
| meta | description |
|---|---|
| Returns | Sphere |
| Defined in | cocos2d/core/geom-utils/sphere.ts:59 |
Parameters
pSphere The target of cloning.
copy
copy the values from one sphere to another
| meta | description |
|---|---|
| Returns | Sphere |
| Defined in | cocos2d/core/geom-utils/sphere.ts:72 |
Parameters
outSphere Accept the sphere of operations.aSphere Sphere being copied.
fromPoints
create a new bounding sphere from two corner points
| meta | description |
|---|---|
| Returns | Sphere |
| Defined in | cocos2d/core/geom-utils/sphere.ts:89 |
Parameters
outUnknown Accept the sphere of operations.minPosUnknown The smallest point of sphere.maxPosUnknown The maximum point of sphere.
set
Set the components of a sphere to the given values
| meta | description |
|---|---|
| Returns | Sphere |
| Defined in | cocos2d/core/geom-utils/sphere.ts:106 |
Parameters
outSphere Accept the sphere of operations.cxUnknown X coordinates of the shape relative to the origin.cyUnknown Y coordinates of the shape relative to the origin.czUnknown Z coordinates of the shape relative to the origin.rnumber Radius.
clone
Clone.
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/sphere.ts:161 |
copy
Copy sphere
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/sphere.ts:172 |
Parameters
aUnknown Copy target.
getBoundary
Get the bounding points of this shape
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/sphere.ts:184 |
Parameters
transform
Transform this shape
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/sphere.ts:198 |
Parameters
mUnknown The transformation matrix.posUnknown The position part of the transformation.rotUnknown The rotating part of the transformation.scaleUnknown The scaling part of the transformation.outUnknown The target of the transformation.
setScale
Scale out based on the sphere data.
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/sphere.ts:227 |
Parameters
scaleUnknown Scale valueoutUnknown Scale target