新增RealtimeCollisions.testCircleBox用于检测园与方框是否重叠并返回point交点

This commit is contained in:
yhh
2020-12-04 16:48:33 +08:00
parent c8096e3334
commit 8b3b645fbb
4 changed files with 86 additions and 21 deletions

View File

@@ -2691,6 +2691,19 @@ declare module es {
declare module es {
class RealtimeCollisions {
static intersectMovingCircleBox(s: Circle, b: Box, movement: Vector2, time: Ref<number>): boolean;
/**
* 支持函数返回索引为n的矩形vert
* @param b
* @param n
*/
static corner(b: Rectangle, n: number): Vector2;
/**
* 检查圆是否与方框重叠并返回point交点
* @param cirlce
* @param box
* @param point
*/
static testCircleBox(cirlce: Circle, box: Box, point: Vector2): boolean;
}
}
declare module es {