helper for check aabb is valid or not

This commit is contained in:
Recep Aslantas
2018-04-02 12:35:22 +03:00
parent b0991342a6
commit 86efe64b8e

View File

@@ -165,4 +165,16 @@ glm_aabb_invalidate(vec3 box[2]) {
glm_vec_broadcast(-FLT_MAX, box[1]);
}
/*!
* @brief check if AABB is valid or not
*
* @param[in] box bounding box
*/
CGLM_INLINE
bool
glm_aabb_isvalid(vec3 box[2]) {
return glm_vec_max(box[0]) != FLT_MAX
&& glm_vec_min(box[1]) != -FLT_MAX;
}
#endif /* cglm_box_h */