跳到主要内容

KPoint3d interface

KPoint3d类代表一个三维点。 三维点有三个坐标。 三维点的坐标是不可变的。

The KPoint3d class represents a 3D point. A 3D point is an ordered triplet of numbers (labeled x, y, and z). NOTE: KPoint3d's x, y and z are immutable.

Signature:

export interface KPoint3d 

Properties

Property

Modifiers

Type

Description

x

readonly

number

获得x坐标。

Get point's x value.

y

readonly

number

获得y坐标。

Get point's y value.

z

readonly

number

获得z坐标。

Get point's z value.

Methods

Method

Description

added(vector)

对当前点应用一向量,实现对点的平移。

Return a new KPoint3d which is this point add the input vector.

appliedMatrix4(matrix)

通过一个矩阵对当前点进行变换,获得一新点。

Return a new KPoint3d which is the result of this point transformed by the input matrix.

clone()

复制一个当前点。

Return the cloned point of this.

distanceTo(other)

求当前点到另一个点的距离。

Get the distance to another point.

isEqual(other, tolerance)

检查两个点在特定容差下是否相等。

Check whether two points are equal with specified tolerance.

squaredDistanceTo(other)

求当前点到另一个点的平方距离。

Get the distance to another point.

subtracted(point)

获得由目标点指向当前点的向量。

Return a new KVector3d which is this point subtract another point.