KBoundingBox2d.isOverlapping() method
检查传入包围盒在指定容差下,与当前包围盒是否有重叠区域。 注意:重叠区域的子集包括两个包围盒为嵌套关系。
Check whether this input bounding box and this bounding box share the same space with specified tolerance. NOTE: 'inside' relationship is included.
Signature:
isOverlapping(other: KBoundingBox2d, tolerance?: number): boolean;
Links: isOverlapping(other: KBoundingBox2d, tolerance?: number): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
other | 传入包围盒。 The input bounding box. | |
tolerance | number | (Optional) 传入容差。 The specified tolerance. |
Returns:
boolean
当输入包围盒与当前包围盒有共同区域,返回true。
Return true if two box share the same space, otherwise return false.