Combines AABBs x and y to return a new AABB z.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(aabb_t), | intent(in) | :: | x | An aabb_t instance. |
||
| type(aabb_t), | intent(in) | :: | y | An aabb_t instance. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=rp), | public, | dimension(3) | :: | lbnd | |||
| real(kind=rp), | public, | dimension(3) | :: | ubnd | |||
| real(kind=rp), | public, | dimension(3) | :: | center | |||
| real(kind=rp), | public | :: | srfarea |
| procedure, public :: init => aabb_init | |
| procedure, public :: print => aabb_print | |
| procedure, public :: clear => aabb_clear | |
| procedure, public :: get_extent => aabb_get_extent | |
| procedure, public :: update => aabb_update | |
| procedure, public :: fatten => aabb_fatten | |
| procedure, public :: includes => aabb_includes | |
| procedure, public :: overlaps => aabb_overlaps | |
| procedure, private :: calc_center => aabb_calc_center | |
| procedure, private :: calc_srfarea => aabb_calc_srfarea |
Initializes an aabb_t instance from lower and upper bounds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(out) | :: | this | An aabb_t instance. |
||
| real(kind=rp), | intent(in), | dimension(3) | :: | lbnd | Lower bound |
|
| real(kind=rp), | intent(in), | dimension(3) | :: | ubnd | Upper bound |
Prints an AABB.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(in) | :: | this | An aabb_t instance. |
||
| character(len=*), | intent(in), | optional | :: | frmt | Fortran-style format string for a real number. Default: (g0.6). |
|
| character(len=:), | intent(out), | optional | allocatable | :: | str | If present, the output is printed to this string instead of STDOUT. |
Clears all attributes of an AABB and sets them to zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(inout) | :: | this | An aabb_t instance. |
Calculates the extent of an aabb. The extent of an AABB is defined as the difference between its upper and lower bounds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(in) | :: | this | An aabb_t instance. |
||
| real(kind=rp), | intent(out), | dimension(3) | :: | extent | Extent of an AABB. |
Updates an AABB with new bounds.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(inout) | :: | this | An aabb_t instance. |
||
| real(kind=rp), | intent(in), | optional | dimension(3) | :: | lbnd | Lower bound |
| real(kind=rp), | intent(in), | optional | dimension(3) | :: | ubnd | Upper bound |
Fattens an AABB by a fraction of its base extent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(inout) | :: | this | An aabb_t instance. |
||
| real(kind=rp), | intent(in) | :: | frac | Fraction of AABB base extent. |
Calculates the center of an aabb.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(inout) | :: | this | An aabb_t instance. |
Calculates the surface area of an aabb.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_t), | intent(inout) | :: | this | An aabb_t instance. |