geomUtils.Plane 类型
模块: cc
平面。
索引
属性(properties)
方法
create创建一个新的 plane。clone克隆一个新的 plane。copy复制一个平面的值到另一个。fromPoints用三个点创建一个平面。set将给定平面的属性设置为给定值。fromNormalAndPoint用一条法线和一个点创建平面。normalize归一化一个平面。transform变换一个平面。
Details
属性(properties)
n
法线向量。
| meta | description |
|---|---|
| 类型 | Vec3 |
| 定义于 | cocos2d/core/geom-utils/plane.ts:173 |
d
原点到平面的距离。
| meta | description |
|---|---|
| 类型 | number |
| 定义于 | cocos2d/core/geom-utils/plane.ts:182 |
方法
create
创建一个新的 plane。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:46 |
参数列表
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
克隆一个新的 plane。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:62 |
参数列表
pPlane The source of cloning.
copy
复制一个平面的值到另一个。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:75 |
参数列表
outPlane The object that accepts the action.pPlane The source of the copy.
fromPoints
用三个点创建一个平面。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:92 |
参数列表
set
将给定平面的属性设置为给定值。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:114 |
参数列表
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
用一条法线和一个点创建平面。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:136 |
参数列表
outPlane The object that accepts the action.normalVec3 The normal of a plane.pointVec3 A point on the plane.
normalize
归一化一个平面。
| meta | description |
|---|---|
| 返回 | Plane |
| 定义于 | cocos2d/core/geom-utils/plane.ts:154 |
参数列表
outPlane The object that accepts the action.aPlane Source data for operations.
transform
变换一个平面。
| meta | description |
|---|---|
| 定义于 | cocos2d/core/geom-utils/plane.ts:208 |
参数列表
matMat4