Fermat
Classes | Typedefs | Functions
Bounding Boxes

Detailed Description

This module defines everything related to bounding boxes

Classes

struct  cugar::Bbox< Vector_t >
 
struct  cugar::bbox_area_functor< DIM >
 

Typedefs

typedef Bbox< Vector2fcugar::Bbox2f
 
typedef Bbox< Vector3fcugar::Bbox3f
 
typedef Bbox< Vector4fcugar::Bbox4f
 
typedef Bbox< Vector2dcugar::Bbox2d
 
typedef Bbox< Vector3dcugar::Bbox3d
 
typedef Bbox< Vector4dcugar::Bbox4d
 
typedef Bbox< Vector2icugar::Bbox2i
 
typedef Bbox< Vector3icugar::Bbox3i
 
typedef Bbox< Vector4icugar::Bbox4i
 
typedef Bbox< Vector2ucugar::Bbox2u
 
typedef Bbox< Vector3ucugar::Bbox3u
 
typedef Bbox< Vector4ucugar::Bbox4u
 

Functions

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)
 

Function Documentation

◆ area() [1/2]

float cugar::area ( const Bbox2f bbox)
inline

compute the area of a 2d bbox

Parameters
bboxbbox object

◆ area() [2/2]

float cugar::area ( const Bbox3f bbox)
inline

compute the area of a 3d bbox

Parameters
bboxbbox object

◆ 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
bboxbbox object
ppoint 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
bboxbbox object
pcandidate 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
bboxbbox object

◆ 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
bboxbbox object

◆ 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
bboxbbox object
ppoint