From 984916d52065c3f4f3e262ed3ed3966892ff182c Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 2 Apr 2018 11:50:53 +0300 Subject: [PATCH] invalidate axis-aligned boundng box util --- include/cglm/box.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/cglm/box.h b/include/cglm/box.h index d7184c5..c8115a6 100644 --- a/include/cglm/box.h +++ b/include/cglm/box.h @@ -153,4 +153,16 @@ glm_aabb_frustum(vec3 box[2], vec4 planes[6]) { return true; } +/*! + * @brief invalidate AABB min and max values + * + * @param[in, out] box bounding box + */ +CGLM_INLINE +void +glm_aabb_invalidate(vec3 box[2]) { + glm_vec_broadcast(FLT_MAX, box[0]); + glm_vec_broadcast(-FLT_MAX, box[1]); +} + #endif /* cglm_box_h */