Public Member Functions | List of all members
vbl_bounding_box< T, DIM > Class Template Reference

A class to hold and update a bounding box. More...

#include <vbl_bounding_box.h>

Inheritance diagram for vbl_bounding_box< T, DIM >:
Inheritance graph
[legend]

Public Member Functions

void update (T const &x)
 Incorporate 1d point x. More...
 
void update (T const &x, T const &y)
 Incorporate 2d point x, y. More...
 
void update (T const &x, T const &y, T const &z)
 Incorporate 3d point x, y, z. More...
 
void update (T const *point)
 Incorporate DIM-d point. More...
 
int dimension () const
 return dimension. More...
 
void reset ()
 Reset to empty. More...
 
bool empty () const
 Return initialisation status. More...
 
bool inside (const T &x, const T &y) const
 is a 2D point inside the bounding box. More...
 
bool inside (const T &x, const T &y, const T &z) const
 is a 3D point inside the bounding box. More...
 
bool inside (T const *point) const
 inside test for arbitrary dimension. More...
 
volume () const
 return "volume". More...
 
std::ostream & print (std::ostream &s) const
 
T const * min () const
 
T * min ()
 
T const * max () const
 
T * max ()
 
T const & xmin () const
 
T const & xmax () const
 
T const & ymin () const
 
T const & ymax () const
 
T const & zmin () const
 
T const & zmax () const
 

Detailed Description

template<class T, int DIM>
class vbl_bounding_box< T, DIM >

A class to hold and update a bounding box.

Save valuable time not writing

if (x > xmax).....

Definition at line 173 of file vbl_bounding_box.h.

Member Function Documentation

◆ dimension()

int vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::dimension ( ) const
inlineinherited

return dimension.

Definition at line 59 of file vbl_bounding_box.h.

◆ empty()

bool vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::empty ( ) const
inlineinherited

Return initialisation status.

Definition at line 79 of file vbl_bounding_box.h.

◆ inside() [1/3]

bool vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::inside ( const T &  x,
const T &  y 
) const
inlineinherited

is a 2D point inside the bounding box.

Definition at line 82 of file vbl_bounding_box.h.

◆ inside() [2/3]

bool vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::inside ( const T &  x,
const T &  y,
const T &  z 
) const
inlineinherited

is a 3D point inside the bounding box.

Definition at line 93 of file vbl_bounding_box.h.

◆ inside() [3/3]

bool vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::inside ( T const *  point) const
inlineinherited

inside test for arbitrary dimension.

Definition at line 105 of file vbl_bounding_box.h.

◆ max() [1/2]

T const* vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::max ( ) const
inlineinherited

Definition at line 125 of file vbl_bounding_box.h.

◆ max() [2/2]

T* vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::max ( )
inlineinherited

Definition at line 128 of file vbl_bounding_box.h.

◆ min() [1/2]

T const* vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::min ( ) const
inlineinherited

Definition at line 124 of file vbl_bounding_box.h.

◆ min() [2/2]

T* vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::min ( )
inlineinherited

Definition at line 127 of file vbl_bounding_box.h.

◆ print()

std::ostream & vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::print ( std::ostream &  s) const
inherited

Definition at line 21 of file vbl_bounding_box.hxx.

◆ reset()

void vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::reset ( )
inlineinherited

Reset to empty.

Definition at line 76 of file vbl_bounding_box.h.

◆ update() [1/4]

void vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::update ( T const &  x)
inlineinherited

Incorporate 1d point x.

Definition at line 39 of file vbl_bounding_box.h.

◆ update() [2/4]

void vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::update ( T const &  x,
T const &  y 
)
inlineinherited

Incorporate 2d point x, y.

Definition at line 45 of file vbl_bounding_box.h.

◆ update() [3/4]

void vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::update ( T const &  x,
T const &  y,
T const &  z 
)
inlineinherited

Incorporate 3d point x, y, z.

Definition at line 52 of file vbl_bounding_box.h.

◆ update() [4/4]

void vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::update ( T const *  point)
inlineinherited

Incorporate DIM-d point.

Definition at line 62 of file vbl_bounding_box.h.

◆ volume()

T vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::volume ( ) const
inlineinherited

return "volume".

Definition at line 114 of file vbl_bounding_box.h.

◆ xmax()

T const& vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::xmax ( ) const
inlineinherited

Definition at line 131 of file vbl_bounding_box.h.

◆ xmin()

T const& vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::xmin ( ) const
inlineinherited

Definition at line 130 of file vbl_bounding_box.h.

◆ ymax()

T const& vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::ymax ( ) const
inlineinherited

Definition at line 133 of file vbl_bounding_box.h.

◆ ymin()

T const& vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::ymin ( ) const
inlineinherited

Definition at line 132 of file vbl_bounding_box.h.

◆ zmax()

T const& vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::zmax ( ) const
inlineinherited

Definition at line 135 of file vbl_bounding_box.h.

◆ zmin()

T const& vbl_bounding_box_base< T, vbl_bounding_box_DIM< DIM > >::zmin ( ) const
inlineinherited

Definition at line 134 of file vbl_bounding_box.h.


The documentation for this class was generated from the following file: