Class: Plane
平面数学类
Properties
Constructors
Methods
Properties
point
• point: Vector3
平面中心位置
Defined in
normal
• normal: Vector3
= Vector3.UP
平面法向量
Defined in
Constructors
constructor
• new Plane(pos
, normal
)
构造新的平面对象
Parameters
Name | Type | Description |
---|---|---|
pos | Vector3 | 平面位置 |
normal | Vector3 | 平面法线量 |
Defined in
Methods
clone
▸ clone(): Plane
复制平面
Returns
返回拷贝的新平面
Defined in
intersectsLine
▸ intersectsLine(start
, end
, point
): boolean
判断平面是否和某线段相交,并计算交点
Parameters
Name | Type | Description |
---|---|---|
start | any | 线段起始点 |
end | any | 线段结束点 |
point | any | 输出交点 |
Returns
boolean
返回是否相交
Defined in
intersectsRay
▸ intersectsRay(ray
, targetPoint?
): boolean
判断平面是否和某射线相交,并计算交点
Parameters
Name | Type | Description |
---|---|---|
ray | Ray | 输入射线 |
targetPoint? | Vector3 | - |
Returns
boolean
返回是否相交