跳到主要内容

KCircle3d interface

KCircle3d类代表着三维空间中的一个圆。

The KCircle3d class represents a circle in 3d space.

Signature:

export interface KCircle3d extends KCurve3d 

Links: export interface KCircle3d extends KCurve3d

Extends: KCurve3d

Properties

Property

Modifiers

Type

Description

center

readonly

KPoint3d

获取圆心。

Get center of the circle.

normal

readonly

KVector3d

获取圆的法向量。

Get the normal of the circle.

radius

readonly

number

获取圆的半径。

Get radius of the circle.

Methods

Method

Description

getPlane()

获取当前圆所落的平面。

Get the plane where the circle is on.

getTangent(point)

获取圆上一点的法向量。 注意:传入点需要确保落在圆上。

Get circle's tangent vector of a point on the circle. NOTE: the caller need to make sure the point is on the circle.

transform(matrix)

对当前圆进行变换。 注意:如果变换之后的几何不是一个圆,则会抛出error, 本操作仅支持旋转和平移。

Transform this circle to a new one. NOTE: If the new one is not a circle, it will throw error. Only support for rotate and move translation now.