Skip to main content

KBoundingBox3d

kds-plugin-document / Exports / KBoundingBox3d

Interface: KBoundingBox3d

KBoundingBox3d类代表着三维空间中的一个包围盒。

The KBoundingBox3d class represents a bounding box in 3d space.

Table of contents​

Properties​

Methods​

Properties​

center​

• Readonly center: KPoint3d

获取包围盒的中心点。

Get bounding box' center point.

Defined in​

api.d.ts:7751


depth​

• Readonly depth: number

获取包围盒的深度(z方向)。

Get bounding box' depth (z direction).

Defined in​

api.d.ts:7769


height​

• Readonly height: number

获取包围盒的高度(y方向)。

Get bounding box' height (y direction).

Defined in​

api.d.ts:7763


max​

• Readonly max: KPoint3d

获取包围盒的右上端点。

Get bounding box' maximum point.

Defined in​

api.d.ts:7745


min​

• Readonly min: KPoint3d

获取包围盒的左下端点。

Get bounding box' minimum point.

Defined in​

api.d.ts:7739


width​

• Readonly width: number

获取包围盒的宽度(x方向)。

Get bounding box' width (x direction).

Defined in​

api.d.ts:7757

Methods​

addPoint​

▸ addPoint(point): void

包围盒加入一个点,包围盒的表征范围会改变。

Add point into bounding box, bounding box's min and max will maybe be changed.

Parameters​

NameTypeDescription
pointKPoint3d要加入的点。 the added point.

Returns​

void

Defined in​

api.d.ts:7797


expand​

▸ expand(delta): void

包围盒的范围三向扩大一个Δ。 注意:如何Δ是一个负数,则包围盒的控制范围会减小,甚至会反转。

Expand the bounding box by a delta value. NOTE: if delta is a minus value, bounding box will be shrunk or even be reversed.

Parameters​

NameTypeDescription
deltanumber扩张参数。 The expanded coefficient.

Returns​

void

Defined in​

api.d.ts:7809


isEqual​

▸ isEqual(other, tolerance?): boolean

在指定的容差下检查两个包围盒是否相等。

Check whether two bounding boxes are equal with specified tolerances.

Parameters​

NameTypeDescription
otherKBoundingBox3d需要被比较的包围盒。 The bounding box to compare this bounding box with.
tolerance?number指定容差·1,默认值是1e-6。 The specified tolerance.The default value is 1e-6.

Returns​

boolean

两者相等返回true,否则为false。

Return true if equal, otherwise return false.

Defined in​

api.d.ts:7787


isInside​

▸ isInside(other, tolerance?): boolean

检查输入包围盒在指定容差下是否落在包围盒中。 注意:包围盒的区域范围包括包围盒边界。

Check whether this bounding box is in the input bounding box with specified tolerance. NOTE: boundary is included.

Parameters​

NameTypeDescription
otherKBoundingBox3d传入包围盒。 The input bounding box.
tolerance?number传入容差。 The specified tolerance.

Returns​

boolean

当输入包围盒落在包围盒中,返回true。

Return True if this box is inside the input box, otherwise return false.

Defined in​

api.d.ts:7869


isOverlapping​

▸ isOverlapping(other, tolerance?): boolean

检查传入包围盒在指定容差下,与当前包围盒是否有重叠区域。 注意:重叠区域的子集包括两个包围盒为嵌套关系。

Check whether this input bounding box and this bounding box share the same space with specified tolerance. NOTE: 'inside' relationship is included.

Parameters​

NameTypeDescription
otherKBoundingBox3d传入包围盒。 The input bounding box.
tolerance?number传入容差。 The specified tolerance.

Returns​

boolean

当输入包围盒与当前包围盒有共同区域,返回true。

Return true if two box share the same space, otherwise return false.

Defined in​

api.d.ts:7889


isPointInside​

▸ isPointInside(point, tolerance?): boolean

检查输入点在指定容差下是否落在包围盒中。 注意:包围盒的区域范围包括包围盒边界。

Check whether the input point is in this bounding box with specified tolerance. NOTE: boundary is included.

Parameters​

NameTypeDescription
pointKPoint3d输入点。 The input point.
tolerance?number传入容差。 The specified tolerance.

Returns​

boolean

当输入点落在包围盒中,返回true。

Return True if the input point is inside this box, otherwise return false.

Defined in​

api.d.ts:7849


isValid​

▸ isValid(): boolean

包围盒是否有效。

Whether this bounding box is valid.

Returns​

boolean

当左下角点的坐标小于右上角的坐标时范围true。

True will be returned if min's xyz are smaller or equal to max' xyz.

Defined in​

api.d.ts:7829


merge​

▸ merge(box): void

合并另外一个包围盒,使得当前包围盒可以包围传入包围盒。

Merge another bounding box, thus this bounding box is able to contain the another box.

Parameters​

NameTypeDescription
boxKBoundingBox3d要合并的包围盒。 The merged bounding box.

Returns​

void

Defined in​

api.d.ts:7819