liba 0.1.15
An algorithm library based on C/C++
Loading...
Searching...
No Matches
bounding volume
Collaboration diagram for bounding volume:

Functions

int a_bounding_box2 (a_point2 const *i_p, a_size i_n, a_real *xmin, a_real *xmax, a_real *ymin, a_real *ymax)
 compute the axis-aligned bounding box (AABB) for a set of 2D points.
int a_bounding_box3 (a_point3 const *i_p, a_size i_n, a_real *xmin, a_real *xmax, a_real *ymin, a_real *ymax, a_real *zmin, a_real *zmax)
 compute the axis-aligned bounding box (AABB) for a set of 3D points.
a_size a_bounding_obb2 (a_point2 *i_p, a_size i_n, a_point2 *o_p, a_size o_n, a_point2 *o, a_vector2 *u, a_vector2 *v, a_real *umax, a_real *vmax)
 compute the minimum area Oriented Bounding Box (OBB) for a set of 2D points.

Detailed Description

Function Documentation

◆ a_bounding_box2()

int a_bounding_box2 ( a_point2 const * i_p,
a_size i_n,
a_real * xmin,
a_real * xmax,
a_real * ymin,
a_real * ymax )

compute the axis-aligned bounding box (AABB) for a set of 2D points.

Parameters
[in]i_ppoints to the 2D points in memory
[in]i_nnumber of the 2D points in memory
[out]xminstores the minimum X coordinate; may be NULL
[out]xmaxstores the maximum X coordinate; may be NULL
[out]yminstores the minimum Y coordinate; may be NULL
[out]ymaxstores the maximum Y coordinate; may be NULL
Returns
error code value
Return values
<0failure
0success

◆ a_bounding_box3()

int a_bounding_box3 ( a_point3 const * i_p,
a_size i_n,
a_real * xmin,
a_real * xmax,
a_real * ymin,
a_real * ymax,
a_real * zmin,
a_real * zmax )

compute the axis-aligned bounding box (AABB) for a set of 3D points.

Parameters
[in]i_ppoints to the 3D points in memory
[in]i_nnumber of the 3D points in memory
[out]xminstores the minimum X coordinate; may be NULL
[out]xmaxstores the maximum X coordinate; may be NULL
[out]yminstores the minimum Y coordinate; may be NULL
[out]ymaxstores the maximum Y coordinate; may be NULL
[out]zminstores the minimum Z coordinate; may be NULL
[out]zmaxstores the maximum Z coordinate; may be NULL
Returns
error code value
Return values
<0failure
0success

◆ a_bounding_obb2()

a_size a_bounding_obb2 ( a_point2 * i_p,
a_size i_n,
a_point2 * o_p,
a_size o_n,
a_point2 * o,
a_vector2 * u,
a_vector2 * v,
a_real * umax,
a_real * vmax )

compute the minimum area Oriented Bounding Box (OBB) for a set of 2D points.

Parameters
[in,out]i_ppoints to the input 2D points in memory
[in]i_nnumber of the input 2D points in memory
[out]o_ppoints to the output memory where the convex hull points will be stored
[in]o_nnumber of the output memory where the convex hull points will be stored
[out]ostores the origin of the minimum area Oriented Bounding Box
[out]ustores the unit vector representing the X-axis
[out]vstores the unit vector representing the Y-axis
[out]umaxstores the scalar length along the X-axis
[out]vmaxstores the scalar length along the Y-axis
Returns
the number of points in the computed convex hull
Return values
0if the output memory is too small to hold the result