BBox Class Reference

Clothoids: G2lib::BBox Class Reference
Clothoids
G2lib::BBox Class Reference

#include <BBox.hxx>

Public Types

using PtrBBox = shared_ptr<BBox const>
 
using PairPtrBBox = pair<PtrBBox,PtrBBox>
 
using VecPtrBBox = vector<PtrBBox>
 
using VecPairPtrBBox = vector<PairPtrBBox>
 

Public Member Functions

 BBox (real_type xmin, real_type ymin, real_type xmax, real_type ymax, integer id, integer ipos)
 
 BBox (real_type const bbox[4], integer id, integer ipos)
 
 BBox (real_type const bbox_min[2], real_type const bbox_max[2], integer id, integer ipos)
 
 BBox (vector< PtrBBox > const &bboxes, integer id, integer ipos)
 
real_type const * bbox ()
 
real_type const * bbox_min ()
 
real_type const * bbox_max ()
 
real_typex_min ()
 x-minimum coordinate of the bbox
 
real_typey_min ()
 y-minimum coordinate of the bbox
 
real_typex_max ()
 x-maximum coordinate of the bbox
 
real_typey_max ()
 y-maximum coordinate of the bbox
 
real_type const & x_min () const
 x-minimum coordinate of the bbox
 
real_type const & y_min () const
 y-minimum coordinate of the bbox
 
real_type const & x_max () const
 x-maximum coordinate of the bbox
 
real_type const & y_max () const
 y-maximum coordinate of the bbox
 
integer const & Id () const
 return BBOX id
 
integer const & Ipos () const
 return BBOX position
 
BBox const & operator= (BBox const &rhs)
 
bool collision (BBox const &box) const
 
void join (vector< PtrBBox > const &bboxes)
 
real_type distance (real_type x, real_type y) const
 
real_type max_distance (real_type x, real_type y) const
 
void print (ostream_type &stream) const
 

Detailed Description

Class to manipulate bounding box

Constructor & Destructor Documentation

◆ BBox() [1/4]

G2lib::BBox::BBox ( real_type xmin,
real_type ymin,
real_type xmax,
real_type ymax,
integer id,
integer ipos )
inline

Construct a bounding box with additional information

Parameters
[in]xmin\( x \)-minimimum box coordinate
[in]ymin\( y \)-minimimum box coordinate
[in]xmax\( x \)-maximum box coordinate
[in]ymax\( y \)-maximum box coordinate
[in]ididentifier of the box
[in]iposranking position of the box

◆ BBox() [2/4]

G2lib::BBox::BBox ( real_type const bbox[4],
integer id,
integer ipos )
inline

Construct a bounding box with additional information

Parameters
[in]bboxbbox [pmin, pmax]
[in]ididentifier of the box
[in]iposranking position of the box

◆ BBox() [3/4]

G2lib::BBox::BBox ( real_type const bbox_min[2],
real_type const bbox_max[2],
integer id,
integer ipos )
inline

Construct a bounding box with additional information

Parameters
[in]bbox_minbounding box lower corner
[in]bbox_maxbounding box upper corner
[in]ididentifier of the box
[in]iposranking position of the box

◆ BBox() [4/4]

G2lib::BBox::BBox ( vector< PtrBBox > const & bboxes,
integer id,
integer ipos )
inline

Build a buonding box that cover a list of bounding box

Parameters
[in]bboxeslist of bounding box
[in]ididentifier of the box
[in]iposranking position of the box

Member Function Documentation

◆ collision()

bool G2lib::BBox::collision ( BBox const & box) const
inline

detect if two bbox collide

◆ distance()

real_type G2lib::BBox::distance ( real_type x,
real_type y ) const

distance of the point (x,y) to the bbox

◆ join()

void G2lib::BBox::join ( vector< PtrBBox > const & bboxes)

Build bbox for a list of bbox

◆ max_distance()

real_type G2lib::BBox::max_distance ( real_type x,
real_type y ) const

Maximum distance of the point (x,y) to the point of bbox

◆ operator=()

BBox const & G2lib::BBox::operator= ( BBox const & rhs)
inline

copy a bbox

◆ print()

void G2lib::BBox::print ( ostream_type & stream) const

Pretty print a bbox


The documentation for this class was generated from the following files:
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/Clothoids/BBox.hxx
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Clothoids/src/BBox.cc