Skip to content

Class: Plane3D

Language

zh_CN

Classdesc

Plane3D 类 3D空间中的平面表示数据 由a,b,c,d4个分量组成 在三维空间中定义了一个平面 Ax + By + Cz + D = 0

Include Example

geom/Plane3D.ts

Version

Platform

Web,Native

Constructors

Properties

Methods

Constructors

constructor

new Plane3D(a?, b?, c?, d?): Plane3D

Parameters

NameTypeDefault value
anumber0
bnumber0
cnumber0
dnumber0

Returns

Plane3D

Language

zh_CN 创建一个平面实例

Platform

Web,Native

Defined in

src/math/Plane3D.ts:93

Properties

a

a: number

Language

zh_CN 平面中的a分量

Platform

Web,Native

Defined in

src/math/Plane3D.ts:24


b

b: number

Language

zh_CN 平面中的b分量

Platform

Web,Native

Defined in

src/math/Plane3D.ts:35


c

c: number

Language

zh_CN 平面中的c分量

Platform

Web,Native

Defined in

src/math/Plane3D.ts:46


d

d: number

Language

zh_CN 平面中的d分量

Platform

Web,Native

Defined in

src/math/Plane3D.ts:57

Methods

setTo

setTo(a?, b?, c?, d?): void

Parameters

NameTypeDefault value
anumber0
bnumber0
cnumber0
dnumber0

Returns

void

Language

zh_CN 填充平面的各分量的值

Platform

Web,Native

Defined in

src/math/Plane3D.ts:109


fromPoints

fromPoints(p0, p1, p2): void

Parameters

NameTypeDescription
p0Vector3Vector3
p1Vector3Vector3
p2Vector3Vector3

Returns

void

Language

zh_CN 由3个坐标来创建一个3d平面

Platform

Web,Native

Defined in

src/math/Plane3D.ts:132


fromNormalAndPoint

fromNormalAndPoint(normal, point): void

Parameters

NameTypeDescription
normalVector3Vector3
pointVector3Vector3

Returns

void

Language

zh_CN 由一条normal向量和一个坐标创建一个3d平面

Platform

Web,Native

Defined in

src/math/Plane3D.ts:160


normalize

normalize(): number

Returns

number

number 返回平面长度

Language

zh_CN 单位化3d平面

Platform

Web,Native

Defined in

src/math/Plane3D.ts:178


distance

distance(p): number

Parameters

NameTypeDescription
pVector3Vector3

Returns

number

number 返回计算后的距离

Language

zh_CN 计算3d平面到点p的距离

Platform

Web,Native

Defined in

src/math/Plane3D.ts:204


classifyPoint

classifyPoint(p, epsilon?): number

Parameters

NameTypeDefault valueDescription
pVector3undefinedVector3
epsilonnumber0.01相对偏移值

Returns

number

number int Plane3.FRONT or Plane3D.BACK or Plane3D.INTERSECT

Language

zh_CN 计算3d平面和点p的空间关系

Platform

Web,Native

Defined in

src/math/Plane3D.ts:225


toString

toString(): string

Returns

string

string

Language

zh_CN 当前Plane3D以字符串形式返回

Platform

Web,Native

Defined in

src/math/Plane3D.ts:245

Released under the MIT License