Geom Software - C++ Programming and Geometry Libraries
Fade2D Documentation pages v1.52
GEOM_FADE2D::Bbox2 Class Reference

Boundingbox.

#include <Bbox2.h>

Public Member Functions

 Bbox2 (GeomTest *pGeomTest_=NULL)
 Create a bounding box Bounds stay uninitialized.
 
 Bbox2 (std::vector< Point2 >::const_iterator start_it, std::vector< Point2 >::const_iterator end_it, GeomTest *pGeomTest_=NULL)
 Create a bounding box Bounds initialized to the minimal bounding box of the iterator range of points.
 
bool isValid () const
 Are the bounds valid?
 
void getCorners (std::vector< Point2 > &vBoxCorners) const
 Get the 4 corners.
 
bool add (std::vector< Point2 >::const_iterator start_it, std::vector< Point2 >::const_iterator end_it)
 Add points. More...
 
bool add (size_t numPoints, double *coordinates)
 Add points. More...
 
bool add (const Point2 &p)
 Add a point. More...
 
Bbox2 operator+ (const Bbox2 &b)
 Add a bounding box. More...
 
Point2 getMinPoint () const
 Get the min point. More...
 
Point2 getMaxPoint () const
 Get the max point. More...
 
double getMinCoord () const
 Get minimum coordinate. More...
 
double getMaxCoord () const
 Get maximum coordinate. More...
 
double getRangeX () const
 Get x range. More...
 
double getRangeY () const
 Get y range. More...
 
double getMaxRange () const
 Get max range. More...
 
double get_minX ()
 Get minX. More...
 
double get_minY ()
 Get minY. More...
 
double get_maxX ()
 Get maxX. More...
 
double get_maxY ()
 Get maxY. More...
 
void doubleTheBox ()
 Double the box size Changes the bounds such that the box grows in each direction by half the range.
 

Protected Member Functions

void treatPointForValidBox (const Point2 &p)
 Add a point to a valid box.
 
void treatPointForInvalidBox (const Point2 &p)
 Add a point to an uninitialized.
 

Protected Attributes

double minX
 
double minY
 
double maxX
 
double maxY
 
bool bValid
 
GeomTest * pGeomTest
 

Friends

std::ostream & operator<< (std::ostream &stream, Bbox2 &pC)
 

Member Function Documentation

bool GEOM_FADE2D::Bbox2::add ( std::vector< Point2 >::const_iterator  start_it,
std::vector< Point2 >::const_iterator  end_it 
)
inline
Returns
true if the bounding box changes, false otherwise
bool GEOM_FADE2D::Bbox2::add ( size_t  numPoints,
double *  coordinates 
)
inline
Returns
true if the bounding box changes, false otherwise
bool GEOM_FADE2D::Bbox2::add ( const Point2 p)
inline
Returns
true if the bounding box changes, false otherwise
double GEOM_FADE2D::Bbox2::get_maxX ( )
inline
Returns
maxX
double GEOM_FADE2D::Bbox2::get_maxY ( )
inline
Returns
maxY
double GEOM_FADE2D::Bbox2::get_minX ( )
inline
Returns
minX
double GEOM_FADE2D::Bbox2::get_minY ( )
inline
Returns
minY
double GEOM_FADE2D::Bbox2::getMaxCoord ( ) const
inline
Returns
the largest coordinate value of {x,y}
Point2 GEOM_FADE2D::Bbox2::getMaxPoint ( ) const
inline
Returns
the point with the three maximum coordinates
double GEOM_FADE2D::Bbox2::getMaxRange ( ) const
inline
Returns
the largest range of {x,y}
double GEOM_FADE2D::Bbox2::getMinCoord ( ) const
inline
Returns
the smallest coordinate value of {x,y}
Point2 GEOM_FADE2D::Bbox2::getMinPoint ( ) const
inline
Returns
the point with the three minimum coordinates
double GEOM_FADE2D::Bbox2::getRangeX ( ) const
inline
Returns
maxX-minX
double GEOM_FADE2D::Bbox2::getRangeY ( ) const
inline
Returns
maxY-minY
Bbox2 GEOM_FADE2D::Bbox2::operator+ ( const Bbox2 b)
inline
Returns
the resulting bounding box

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