libgenua
Basic Geometry, Numerical Algorithms and Interfaces
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | Private Attributes | List of all members
BndBox Class Reference

Detailed Description

Bounding box.

Main purpose of this class is the provision of bounding box functionality. A box can be instatiated with two arbitrary corners or a collection of points, via findBbox(). If a collection is given, the bounding box to all points in that collection is computed.

Use Dop3d3 instead.

Deprecated:
See Also
BSearchTree, Triangulation, Dop3d3

#include <bounds.h>

Collaboration diagram for BndBox:
[legend]

Public Member Functions

 BndBox ()
 empty construction
 
 BndBox (const Vct3 &a, const Vct3 &b)
 build from two points
 
void reset ()
 reset to undefined box
 
const Vct3lower () const
 lower point
 
const Vct3upper () const
 upper point
 
void expand (Real dst)
 make box larger by dst in each direction
 
Vct3 center () const
 return center point
 
Real length () const
 return x-size
 
Real width () const
 return y-size
 
Real height () const
 return z-size
 
Real diagonal () const
 compute length of diagonal
 
void findBbox (const PointGrid< 3 > &pg)
 find bounding box of all points in grid
 
void findBbox (const PointList< 3 > &pg)
 find bounding box of all points in list
 
template<class InputIterator >
void findBbox (InputIterator first, InputIterator last)
 find bounding box
 
bool isInside (const Vct3 &p) const
 test if point is inside
 
bool intersects (const BndBox &other) const
 test if boxes intersect
 
BndBox intersection (const BndBox &other) const
 return intersection box
 
Vct3 distance (const Vct3 &pt) const
 compute distance vector (point to its projection on box)
 
void enclose (const Vct3 p)
 expand box to contain point p, if necessary
 
void writeQuads (std::ostream &os) const
 visualization
 
void addQuads (MeshFields &mvz) const
 visualization
 

Private Attributes

Vct3 p1
 lower left forward and upper right backward corner
 

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