跳到主要内容

KNurbsCurve2d 接口

export interface KNurbsCurve2d extends KBoundedCurve2d 

KNurbsCurve2d 类代表着二维空间中的一条非均匀有理样条曲线

The KNurbsCurve2d class represents a nurbs curve in 2d space

继承: KBoundedCurve2d

属性

controlPoints

readonly controlPoints: KPoint2d[];

获取当前样条曲线的控制点集

Get the control points of the nurbs curve

类型: KPoint2d[]

degree

readonly degree: number;

获取当前样条曲线的阶数。

Get the degree of the nurbs curve.

knots

readonly knots: number[];

获取当前样条曲线的节点向量。

Get the knots of the nurbs curve.

weights

readonly weights: number[];

获取当前样条曲线的权重

Get the weights of the nurbs curve

方法

getTangent

getTangent(point: KPoint2d): KVector2d;

获得样条曲线上一点处的切向量。 注意:该函数调用需要确保传入点在样条曲线上。

Get tangent vector of a point on the nurbs curve. NOTE: the caller needs to make sure the point is on the nurbs curve.

参数:

  • point: KPoint2d

    样条曲线上一点。

    A point on the nurbs curve.

返回值: KVector2d

切向量。

The tangent vector.