Geom Software - C++ Programming and Geometry Libraries
Fade3D Documentation pages v0.99
FADE3D::Bbox3 Class Reference

Axis-aligned minimal 3D bounding box.

#include <Bbox3.h>

Public Member Functions

 Bbox3 ()
 Constructor. More...
 
 Bbox3 (const std::vector< Point3 > &vPoints)
 Constructor. More...
 
bool isValid ()
 Check if the bounding box is valid. More...
 
bool add (const std::vector< Point3 > &vPoints)
 Add points to the bounding box. More...
 
bool add (const Point3 &p)
 Add a point to the bounding box. More...
 
Bbox3 operator+ (Bbox3 &b)
 Add another bounding box. More...
 
Point3 getMinPoint ()
 Get the minimum corner. More...
 
Point3 getMaxPoint ()
 Get the maximum corner. More...
 
double getMinCoord ()
 Get the smallest coordinate. More...
 
double getMaxCoord ()
 Get the largest coordinate. More...
 
double getRangeX () const
 Get the x-range. More...
 
double getRangeY () const
 Get the y-range. More...
 
double getRangeZ () const
 Get the z-range. More...
 
double getMaxRange () const
 Get the maximum range. More...
 
double getMinX () const
 Get the minimal x coordinate. More...
 
double getMinY () const
 Get the minimal y coordinate. More...
 
double getMinZ () const
 Get the minimal z coordinate. More...
 
double getMaxX () const
 Get the maximal x coordinate. More...
 
double getMaxY () const
 Get the maximal y coordinate. More...
 
double getMaxZ () const
 Get the maximal z coordinate. More...
 

Protected Attributes

double minX
 
double minY
 
double minZ
 
double maxX
 
double maxY
 
double maxZ
 

Friends

class HC3
 
std::ostream & operator<< (std::ostream &stream, Bbox3 &pC)
 

Constructor & Destructor Documentation

◆ Bbox3() [1/2]

FADE3D::Bbox3::Bbox3 ( )
inline

Constructor. The bounds of the bounding box are initialized to -DBL_MAX and +DBL_MAX values. The bounding box becomes valid as soon as points are added.

◆ Bbox3() [2/2]

FADE3D::Bbox3::Bbox3 ( const std::vector< Point3 > &  vPoints)
inlineexplicit

This constructor computes the axis aligned minimal bounding box of the points in vPoints

Member Function Documentation

◆ add() [1/2]

bool FADE3D::Bbox3::add ( const std::vector< Point3 > &  vPoints)
inline

Add vPoints to the bounding box.

Returns
true if the bounds of the present Bbox3 have changed
false otherwise

◆ add() [2/2]

bool FADE3D::Bbox3::add ( const Point3 p)
inline

Add p to the bounding box

Returns
true if the bounds of the present Bbox3 have changed
false otherwise

◆ getMaxCoord()

double FADE3D::Bbox3::getMaxCoord ( )
inline
Returns
the maximum of (maxX,maxY,maxZ)

◆ getMaxPoint()

Point3 FADE3D::Bbox3::getMaxPoint ( )
inline
Returns
the point with the largest coordinates of the bounding box

◆ getMaxRange()

double FADE3D::Bbox3::getMaxRange ( ) const
inline
Returns
the maximum of rangeX,rangeY and rangeZ

◆ getMaxX()

double FADE3D::Bbox3::getMaxX ( ) const
inline

◆ getMaxY()

double FADE3D::Bbox3::getMaxY ( ) const
inline

◆ getMaxZ()

double FADE3D::Bbox3::getMaxZ ( ) const
inline

◆ getMinCoord()

double FADE3D::Bbox3::getMinCoord ( )
inline
Returns
the minimum of (minX,minY,minZ)

◆ getMinPoint()

Point3 FADE3D::Bbox3::getMinPoint ( )
inline
Returns
the point with the smallest coordinates of the bounding box

◆ getMinX()

double FADE3D::Bbox3::getMinX ( ) const
inline

◆ getMinY()

double FADE3D::Bbox3::getMinY ( ) const
inline

◆ getMinZ()

double FADE3D::Bbox3::getMinZ ( ) const
inline

◆ getRangeX()

double FADE3D::Bbox3::getRangeX ( ) const
inline
Returns
the x-range maxX-minX

◆ getRangeY()

double FADE3D::Bbox3::getRangeY ( ) const
inline
Returns
the y-range maxY-minY

◆ getRangeZ()

double FADE3D::Bbox3::getRangeZ ( ) const
inline
Returns
the z-range maxZ-minZ

◆ isValid()

bool FADE3D::Bbox3::isValid ( )
inline

Check if the bounding box has valid bounds. After construction the bounds are initialized to DBL_MAX and DBL_MIN. As soon as the first point is added Bbox3 becomes valid.

◆ operator+()

Bbox3 FADE3D::Bbox3::operator+ ( Bbox3 b)
inline

Add another Bbox3 to the present one.

Returns
the axis aligned minimal bounding box of the union of the two boxes.

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