This module defines everything related to bounding boxes
|
CUGAR_HOST_DEVICE float | cugar::area (const Bbox2f &bbox) |
|
CUGAR_HOST_DEVICE float | cugar::area (const Bbox3f &bbox) |
|
template<typename Vector_t > |
CUGAR_HOST_DEVICE bool | cugar::contains (const Bbox< Vector_t > &bbox, const Vector_t &p) |
|
template<typename Vector_t > |
CUGAR_HOST_DEVICE bool | cugar::contains (const Bbox< Vector_t > &bbox, const Bbox< Vector_t > &candidate) |
|
template<typename Vector_t > |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float | cugar::sq_distance (const Bbox< Vector_t > &bbox, const Vector_t &p) |
|
template<typename Vector_t > |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE size_t | cugar::largest_axis (const Bbox< Vector_t > &bbox) |
|
template<typename Vector_t > |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector_t | cugar::extents (const Bbox< Vector_t > &bbox) |
|
◆ area() [1/2]
float cugar::area |
( |
const Bbox2f & |
bbox | ) |
|
|
inline |
compute the area of a 2d bbox
- Parameters
-
◆ area() [2/2]
float cugar::area |
( |
const Bbox3f & |
bbox | ) |
|
|
inline |
compute the area of a 3d bbox
- Parameters
-
◆ contains() [1/2]
template<typename Vector_t >
CUGAR_HOST_DEVICE bool cugar::contains |
( |
const Bbox< Vector_t > & |
bbox, |
|
|
const Vector_t & |
p |
|
) |
| |
|
inline |
point-in-bbox inclusion predicate
- Parameters
-
bbox | bbox object |
p | point to test for inclusion |
◆ contains() [2/2]
template<typename Vector_t >
CUGAR_HOST_DEVICE bool cugar::contains |
( |
const Bbox< Vector_t > & |
bbox, |
|
|
const Bbox< Vector_t > & |
candidate |
|
) |
| |
|
inline |
bbox-in-bbox inclusion predicate
- Parameters
-
bbox | bbox object |
p | candidate to test for inclusion |
◆ extents()
template<typename Vector_t >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector_t cugar::extents |
( |
const Bbox< Vector_t > & |
bbox | ) |
|
returns the delta between corners
- Parameters
-
◆ largest_axis()
template<typename Vector_t >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE size_t cugar::largest_axis |
( |
const Bbox< Vector_t > & |
bbox | ) |
|
returns the largest axis of a bbox
- Parameters
-
◆ sq_distance()
template<typename Vector_t >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::sq_distance |
( |
const Bbox< Vector_t > & |
bbox, |
|
|
const Vector_t & |
p |
|
) |
| |
point-to-bbox squared distance
- Parameters
-