From 3ca9eaf187051477e8fb0219f014f278cc1178a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Jan 2020 17:47:04 +1100 Subject: BLI_rect: add rect-rect intersection checks on a single axis --- source/blender/blenlib/BLI_rect.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/blenlib/BLI_rect.h') diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h index e3cd70f7413..23a8f775576 100644 --- a/source/blender/blenlib/BLI_rect.h +++ b/source/blender/blenlib/BLI_rect.h @@ -79,6 +79,10 @@ bool BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, cons bool BLI_rcti_compare(const struct rcti *rect_a, const struct rcti *rect_b); bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest); bool BLI_rcti_isect(const struct rcti *src1, const struct rcti *src2, struct rcti *dest); +bool BLI_rctf_isect_rect_x(const struct rctf *src1, const struct rctf *src2, float range_x[2]); +bool BLI_rctf_isect_rect_y(const struct rctf *src1, const struct rctf *src2, float range_y[2]); +bool BLI_rcti_isect_rect_x(const struct rcti *src1, const struct rcti *src2, int range_x[2]); +bool BLI_rcti_isect_rect_y(const struct rcti *src1, const struct rcti *src2, int range_y[2]); bool BLI_rcti_isect_x(const rcti *rect, const int x); bool BLI_rcti_isect_y(const rcti *rect, const int y); bool BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y); -- cgit v1.2.3