geomUtils.Sphere
Class
Sphere.
Index
Properties
Methods
create
create a new sphereclone
clone a new spherecopy
copy the values from one sphere to anotherfromPoints
create a new bounding sphere from two corner pointsset
Set the components of a sphere to the given valuesclone
Clone.copy
Copy spheregetBoundary
Get the bounding points of this shapetransform
Transform this shapesetScale
Scale 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
cx
Unknown X coordinates of the shape relative to the origin.cy
Unknown Y coordinates of the shape relative to the origin.cz
Unknown Z coordinates of the shape relative to the origin.r
Unknown Radius of sphere
clone
clone a new sphere
meta | description |
---|---|
Returns | Sphere |
Defined in | cocos2d/core/geom-utils/sphere.ts:59 |
Parameters
p
Sphere 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
out
Sphere Accept the sphere of operations.a
Sphere 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
out
Unknown Accept the sphere of operations.minPos
Unknown The smallest point of sphere.maxPos
Unknown 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
out
Sphere Accept the sphere of operations.cx
Unknown X coordinates of the shape relative to the origin.cy
Unknown Y coordinates of the shape relative to the origin.cz
Unknown Z coordinates of the shape relative to the origin.r
number 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
a
Unknown 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
m
Unknown The transformation matrix.pos
Unknown The position part of the transformation.rot
Unknown The rotating part of the transformation.scale
Unknown The scaling part of the transformation.out
Unknown 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
scale
Unknown Scale valueout
Unknown Scale target