跳到主要内容

KSurface interface

三维空间所有面的基类。

Root class for all surface in 3d space.

Signature:

export interface KSurface 

Methods

Method

Description

clone()

复制一个当前面。

Return the cloned surface of this.

coplanar(other, tolerance)

考虑两个面的边界,以指定容差检查两个面是否共面。

Check whether two surface are coplanar with respecting their sides and specified tolerance.

coplanarUnsigned(other, tolerance)

忽略两个面的边界,以指定容差检查两个面是否共面。

Check whether two surface are coplanar by ignoring their sides with specified tolerance.

distanceToPoint(point)

获得点到面的距离。

Get the distance from the input point to this surface.

faceToUV(face)

通过面的UV参数坐标系将三维面转换成二维面。 注意:需要保证该三维面落在面上。

Convert a 3D face to 2d face based on surface's uv coordinate system. NOTE: The caller needs to make sure the face is on the surface.

getClosestPoint(point, tolerance)

获得面上距离传入点最近的一点,以指定容差。

Get the closest point on surface for the input point with specified tolerance.

getType()

获取面的类型。

Get the surface's type.

getUVPoint(point)

通过面的UV参数坐标系将三维点转换成二维点。 需要确保传入点在面上。 输出点的x坐标是传入点的u参数。 y坐标是v参数。

Get a 2d point corresponding to a 3d point on the surface. We need make sure the input point is on the surface. The returned point's x coordinate is parameter u of the input 3d point. y coordinate is parameter v of the input 3d point.

isCurveOnSurface(curve, tolerance)

以指定容差检查输入曲线是否在面上。

Check whether the input curve is on the surface or not with specified tolerance.

isPointOnSurface(point, tolerance)

以指定容差检查输入点是否在面上。

Check whether the input point is on the surface or not with specified tolerance.

loopToUV(loop)

通过面的UV参数坐标系将三维环转换成二维环。 注意:需要保证该三维环落在面上。

Convert a 3D loop to 2d loop based on surface's uv coordinate system. NOTE: The caller needs to make sure the loop is on the surface.

signedDistanceTo(point)

获得点到面的距离, 如果点在面的正向则距离为正,否则为负。

Get signed distance between the point and the plane. If the point is on the positive normal side, the sign is +, otherwise it's -

transform(matrix)

对当前面应用一转换矩阵,从而实现对其几何变换。

Transform this surface to a new one.