Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
BoundingBox< CoordType, dim > Class Template Reference

Class for bounding boxes of point clouds. More...

#include <dune/fufem/boundingbox.hh>

Inheritance diagram for BoundingBox< CoordType, dim >:
Inheritance graph

Public Member Functions

 BoundingBox (const CoordType &lower, const CoordType &upper)
 Create box from two given points.
 
 BoundingBox (const CoordType &point)
 Create "box" from one given point.
 
 BoundingBox (const std::vector< const CoordType > &points)
 Create bounding box of a set of points.
 
void expandToInclude (const CoordType &point, bool resetCenter=true)
 expands box to include a new point
 
void setCenter ()
 calculates and sets the coordinates of the center of the box
 
bool insideNeighborhood (const CoordType &point, const double epsilon)
 checks whether a point is inside an epsilon neighborhood of the bounding box
 
bool contains (const CoordType &c) const
 
bool intersects (const Box &b)
 
const CoordType & center () const
 
double size (int i)
 
const CoordType & lower () const
 
const CoordType & upper () const
 

Protected Attributes

CoordType lower_
 
CoordType upper_
 
CoordType center_
 

Detailed Description

template<class CoordType, int dim>
class BoundingBox< CoordType, dim >

Class for bounding boxes of point clouds.

Constructs a bounding box for given point(cloud)s which may be expanded to include further points.

Template Parameters
CoordTypethe type used to specify point coordinates
dimthe dimension of the embedding space

Constructor & Destructor Documentation

◆ BoundingBox() [1/3]

template<class CoordType , int dim>
BoundingBox< CoordType, dim >::BoundingBox ( const CoordType &  lower,
const CoordType &  upper 
)
inline

Create box from two given points.

◆ BoundingBox() [2/3]

template<class CoordType , int dim>
BoundingBox< CoordType, dim >::BoundingBox ( const CoordType &  point)
inline

Create "box" from one given point.

◆ BoundingBox() [3/3]

template<class CoordType , int dim>
BoundingBox< CoordType, dim >::BoundingBox ( const std::vector< const CoordType > &  points)
inline

Create bounding box of a set of points.

Member Function Documentation

◆ center()

template<typename CoordType , int dim>
const CoordType & Box< CoordType, dim >::center ( ) const
inlineinherited

◆ contains()

template<typename CoordType , int dim>
bool Box< CoordType, dim >::contains ( const CoordType &  c) const
inlineinherited

◆ expandToInclude()

template<class CoordType , int dim>
void BoundingBox< CoordType, dim >::expandToInclude ( const CoordType &  point,
bool  resetCenter = true 
)
inline

expands box to include a new point

This method inserts single points into the point cloud and expands the Box correspondingly.

Parameters
pointthe point to be included
resetCenterflag whether the center of the box shall be recalculated after expanding the box

◆ insideNeighborhood()

template<class CoordType , int dim>
bool BoundingBox< CoordType, dim >::insideNeighborhood ( const CoordType &  point,
const double  epsilon 
)
inline

checks whether a point is inside an epsilon neighborhood of the bounding box

Parameters
pointthe point to be checked
epsilonthe extension of the box

◆ intersects()

template<typename CoordType , int dim>
bool Box< CoordType, dim >::intersects ( const Box< CoordType, dim > &  b)
inlineinherited

◆ lower()

template<typename CoordType , int dim>
const CoordType & Box< CoordType, dim >::lower ( ) const
inlineinherited

◆ setCenter()

template<class CoordType , int dim>
void BoundingBox< CoordType, dim >::setCenter ( )
inline

calculates and sets the coordinates of the center of the box

◆ size()

template<typename CoordType , int dim>
double Box< CoordType, dim >::size ( int  i)
inlineinherited

◆ upper()

template<typename CoordType , int dim>
const CoordType & Box< CoordType, dim >::upper ( ) const
inlineinherited

Member Data Documentation

◆ center_

template<typename CoordType , int dim>
CoordType Box< CoordType, dim >::center_
protectedinherited

◆ lower_

template<typename CoordType , int dim>
CoordType Box< CoordType, dim >::lower_
protectedinherited

◆ upper_

template<typename CoordType , int dim>
CoordType Box< CoordType, dim >::upper_
protectedinherited

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