geomUtils.Plane Class
plane。
Index
Properties
Methods
createcreate a new planecloneclone a new planecopycopy the values from one plane to anotherfromPointscreate a plane from three pointssetSet the components of a plane to the given valuesfromNormalAndPointcreate plane from normal and pointnormalizenormalize a planetransformTransform 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
nxNumber The x part of the normal component.nyNumber The y part of the normal component.nzNumber The z part of the normal component.dNumber Distance from the origin.
clone
clone a new plane
| meta | description |
|---|---|
| Returns | Plane |
| Defined in | cocos2d/core/geom-utils/plane.ts:62 |
Parameters
pPlane 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
outPlane The object that accepts the action.pPlane 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
outPlane The object that accepts the action.nxNumber The x part of the normal component.nyNumber The y part of the normal component.nzNumber The z part of the normal component.dNumber 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
outPlane The object that accepts the action.normalVec3 The normal of a plane.pointVec3 A point on the plane.
normalize
normalize a plane
| meta | description |
|---|---|
| Returns | Plane |
| Defined in | cocos2d/core/geom-utils/plane.ts:154 |
Parameters
outPlane The object that accepts the action.aPlane Source data for operations.
transform
Transform a plane.
| meta | description |
|---|---|
| Defined in | cocos2d/core/geom-utils/plane.ts:208 |
Parameters
matMat4