remove _aabb2d_frustum

This commit is contained in:
duarm
2023-12-06 16:48:48 -03:00
parent c1d78d835b
commit 2106f9ebcb
5 changed files with 0 additions and 84 deletions

View File

@@ -24,7 +24,6 @@ Functions:
#. :c:func:`glm_aabb2d_merge`
#. :c:func:`glm_aabb2d_crop`
#. :c:func:`glm_aabb2d_crop_until`
#. :c:func:`glm_aabb2d_frustum`
#. :c:func:`glm_aabb2d_invalidate`
#. :c:func:`glm_aabb2d_isvalid`
#. :c:func:`glm_aabb2d_size`
@@ -93,22 +92,6 @@ Functions documentation
| *[in]* **clampAabb** miniumum box
| *[out]* **dest** cropped bounding box
.. c:function:: bool glm_aabb2d_frustum(vec2 aabb[2], vec4 planes[6])
| check if AABB intersects with frustum planes
this could be useful for frustum culling using AABB.
OPTIMIZATION HINT:
if planes order is similar to LEFT, RIGHT, BOTTOM, TOP, NEAR, FAR
then this method should run even faster because it would only use two
planes if object is not inside the two planes
fortunately cglm extracts planes as this order! just pass what you got!
Parameters:
| *[in]* **aabb** bounding box
| *[out]* **planes** frustum planes
.. c:function:: void glm_aabb2d_invalidate(vec2 aabb[2])
| invalidate AABB min and max values

View File

@@ -121,38 +121,6 @@ glm_aabb2d_crop_until(vec2 aabb[2],
glm_aabb2d_merge(clampAabb, dest, dest);
}
/*!
* @brief check if AABB intersects with frustum planes
*
* this could be useful for frustum culling using AABB.
*
* OPTIMIZATION HINT:
* if planes order is similar to LEFT, RIGHT, BOTTOM, TOP, NEAR, FAR
* then this method should run even faster because it would only use two
* planes if object is not inside the two planes
* fortunately cglm extracts planes as this order! just pass what you got!
*
* @param[in] aabb bounding aabb
* @param[in] planes frustum planes
*/
CGLM_INLINE
bool
glm_aabb2d_frustum(vec2 aabb[2], vec4 planes[6]) {
float *p, dp;
int i;
for (i = 0; i < 6; i++) {
p = planes[i];
dp = p[0] * aabb[p[0] > 0.0f][0]
+ p[1] * aabb[p[1] > 0.0f][1];
if (dp < -p[3])
return false;
}
return true;
}
/*!
* @brief invalidate AABB min and max values
*

View File

@@ -36,10 +36,6 @@ glmc_aabb2d_crop_until(vec2 aabb[2],
vec2 clampAabb[2],
vec2 dest[2]);
CGLM_EXPORT
bool
glmc_aabb2d_frustum(vec2 aabb[2], vec4 planes[6]);
CGLM_EXPORT
void
glmc_aabb2d_invalidate(vec2 aabb[2]);

View File

@@ -105,31 +105,6 @@ glms_aabb2d_(crop_until)(vec2s aabb[2],
glms_aabb2d_(merge)(clampAabb, dest, dest);
}
/*!
* @brief check if AABB intersects with frustum planes
*
* this could be useful for frustum culling using AABB.
*
* OPTIMIZATION HINT:
* if planes order is similar to LEFT, RIGHT, BOTTOM, TOP, NEAR, FAR
* then this method should run even faster because it would only use two
* planes if object is not inside the two planes
* fortunately cglm extracts planes as this order! just pass what you got!
*
* @param[in] aabb bounding box
* @param[in] planes frustum planes
*/
CGLM_INLINE
bool
glms_aabb2d_(frustum)(vec2s box[2], vec4s planes[6]) {
vec2 rawBox[2];
vec4 rawPlanes[6];
glms_vec2_(unpack)(rawBox, box, 2);
glms_vec4_(unpack)(rawPlanes, planes, 6);
return glm_aabb2d_frustum(rawBox, rawPlanes);
}
/*!
* @brief invalidate AABB min and max values
*

View File

@@ -41,12 +41,6 @@ glmc_aabb2d_crop_until(vec2 aabb[2],
glm_aabb2d_crop_until(aabb, cropAabb, clampAabb, dest);
}
CGLM_EXPORT
bool
glmc_aabb2d_frustum(vec2 aabb[2], vec4 planes[6]) {
return glm_aabb2d_frustum(aabb, planes);
}
CGLM_EXPORT
void
glmc_aabb2d_invalidate(vec2 aabb[2]) {