geomUtils.Plane
Class
plane。
Index
Properties
Methods
create
create a new planeclone
clone a new planecopy
copy the values from one plane to anotherfromPoints
create a plane from three pointsset
Set the components of a plane to the given valuesfromNormalAndPoint
create plane from normal and pointnormalize
normalize a planetransform
Transform a plane.
Details
Properties
n
A normal vector.
meta | description |
---|---|
Type | Vec3 |
Defined in | cocos2d/core/geom-utils/plane.ts:173 |
d
The distance from the origin to the plane.
meta | description |
---|---|
Type | number |
Defined in | cocos2d/core/geom-utils/plane.ts:182 |
Methods
create
create a new plane
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:46 |
Parameters
nx
Number The x part of the normal component.ny
Number The y part of the normal component.nz
Number The z part of the normal component.d
Number Distance from the origin.
clone
clone a new plane
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:62 |
Parameters
p
Plane The source of cloning.
copy
copy the values from one plane to another
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:75 |
Parameters
out
Plane The object that accepts the action.p
Plane The source of the copy.
fromPoints
create a plane from three points
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:92 |
Parameters
set
Set the components of a plane to the given values
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:114 |
Parameters
out
Plane The object that accepts the action.nx
Number The x part of the normal component.ny
Number The y part of the normal component.nz
Number The z part of the normal component.d
Number Distance from the origin.
fromNormalAndPoint
create plane from normal and point
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:136 |
Parameters
out
Plane The object that accepts the action.normal
Vec3 The normal of a plane.point
Vec3 A point on the plane.
normalize
normalize a plane
meta | description |
---|---|
Returns | Plane |
Defined in | cocos2d/core/geom-utils/plane.ts:154 |
Parameters
out
Plane The object that accepts the action.a
Plane Source data for operations.
transform
Transform a plane.
meta | description |
---|---|
Defined in | cocos2d/core/geom-utils/plane.ts:208 |
Parameters
mat
Mat4