Portage::IsotheticBBox< D > Class Template Reference

An isothetic (axis-aligned) N-dimensional bounding box. More...

#include <BoundBox.h>

## Public Member Functions

IsotheticBBox ()

void clear ()
Re-initialize box limits to default values. More...

bool empty () const
Tests if the bounding box contains space. More...

void add (const Point< D > &p)

void add (const IsotheticBBox< D > &box)
Update the bounding box by adding the extents of another IsotheticBBox. More...

void bulge (double epsilon)
Expand the box by an additive constant. More...

Point< D > center () const
Calculate the Point of the center of the bounding box. More...

double center (int axis) const
Calculate the center aint the axis axis. More...

Calculate distance from the origin to the center of the bounding box. More...

const Point< D > & getMin () const
Return the minimum of the bounding box. More...

double getMin (int i) const
Return the minimum of the bonding box along axis i. More...

const Point< D > & getMax () const
Return the maximum of the bounding box. More...

double getMax (int i) const
Return the maximum of the bounding box along axis i. More...

int longAxis () const
Find which axis is the longest of the bounding box. More...

double volume () const
Calculate the volume of the bounding box. More...

bool intersect (const Point< D > &p) const
Determine if the Point p is within the bounding box. More...

bool intersect (const IsotheticBBox< D > &b) const
Determine if the IsotheticBBox b is within the bounding box. More...

## Detailed Description

### template<int D> class Portage::IsotheticBBox< D >

An isothetic (axis-aligned) N-dimensional bounding box.

Template Parameters
 D Dimension in which the bounding box lives. Usually one of [1,2,3].

## ◆ IsotheticBBox()

template<int D>
 Portage::IsotheticBBox< D >::IsotheticBBox ( )
inline

## Member Function Documentation

template<int D>
 void Portage::IsotheticBBox< D >::add ( const Point< D > & p )
inline

template<int D>
 void Portage::IsotheticBBox< D >::add ( const IsotheticBBox< D > & box )
inline

Update the bounding box by adding the extents of another IsotheticBBox.

## ◆ bulge()

template<int D>
 void Portage::IsotheticBBox< D >::bulge ( double epsilon )
inline

Expand the box by an additive constant.

## ◆ center() [1/2]

template<int D>
 Point Portage::IsotheticBBox< D >::center ( ) const
inline

Calculate the Point of the center of the bounding box.

## ◆ center() [2/2]

template<int D>
 double Portage::IsotheticBBox< D >::center ( int axis ) const
inline

Calculate the center aint the axis axis.

## ◆ clear()

template<int D>
 void Portage::IsotheticBBox< D >::clear ( )
inline

Re-initialize box limits to default values.

## ◆ empty()

template<int D>
 bool Portage::IsotheticBBox< D >::empty ( ) const
inline

Tests if the bounding box contains space.

## ◆ getMax() [1/2]

template<int D>
 const Point& Portage::IsotheticBBox< D >::getMax ( ) const
inline

Return the maximum of the bounding box.

## ◆ getMax() [2/2]

template<int D>
 double Portage::IsotheticBBox< D >::getMax ( int i ) const
inline

Return the maximum of the bounding box along axis i.

## ◆ getMin() [1/2]

template<int D>
 const Point& Portage::IsotheticBBox< D >::getMin ( ) const
inline

Return the minimum of the bounding box.

## ◆ getMin() [2/2]

template<int D>
 double Portage::IsotheticBBox< D >::getMin ( int i ) const
inline

Return the minimum of the bonding box along axis i.

## ◆ intersect() [1/2]

template<int D>
 bool Portage::IsotheticBBox< D >::intersect ( const Point< D > & p ) const
inline

Determine if the Point p is within the bounding box.

## ◆ intersect() [2/2]

template<int D>
 bool Portage::IsotheticBBox< D >::intersect ( const IsotheticBBox< D > & b ) const
inline

Determine if the IsotheticBBox b is within the bounding box.

## ◆ longAxis()

template<int D>
 int Portage::IsotheticBBox< D >::longAxis ( ) const
inline

Find which axis is the longest of the bounding box.

template<int D>
 double Portage::IsotheticBBox< D >::radius ( bool doSqrt = true ) const
inline

Calculate distance from the origin to the center of the bounding box.

## ◆ volume()

template<int D>
 double Portage::IsotheticBBox< D >::volume ( ) const
inline

Calculate the volume of the bounding box.

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