Fade2.5D Documentation pages v2.16.8
Delaunay Features
Bbox2.h File Reference
#include "Segment2.h"
#include "common.h"

Go to the source code of this file.

Classes

class  GEOM_FADE25D::Bbox2
 A 2D axis-aligned bounding box. More...
 

Functions

Bbox2 GEOM_FADE25D::getBox (std::vector< Point2 * > &vP)
 Computes the bounding box of a set of points. More...
 
Bbox2 GEOM_FADE25D::getBox (std::vector< Point2 > &vP)
 Computes the bounding box of a set of points. More...
 
Bbox2 GEOM_FADE25D::intersection (const Bbox2 &a, const Bbox2 &b)
 Computes the intersection of two bounding boxes. More...
 
std::ostream & GEOM_FADE25D::operator<< (std::ostream &stream, const Bbox2 &pC)
 Prints the bounding box to a stream. More...
 

Function Documentation

◆ getBox() [1/2]

Bbox2 GEOM_FADE25D::getBox ( std::vector< Point2 * > &  vP)
Parameters
vPA vector of Point2 pointers.
Returns
The bounding box that contains all points.

◆ getBox() [2/2]

Bbox2 GEOM_FADE25D::getBox ( std::vector< Point2 > &  vP)
Parameters
vPA vector of Point2 objects.
Returns
The bounding box that contains all points.

◆ intersection()

Bbox2 GEOM_FADE25D::intersection ( const Bbox2 a,
const Bbox2 b 
)
inline

This function calculates the intersection of two 2D axis-aligned bounding boxes, a and b. The intersection is the region where both bounding boxes overlap. If there is no overlap, the resulting bounding box is marked as invalid (bValid = false).

Parameters
aThe first bounding box.
bThe second bounding box.
Returns
A Bbox2 object representing the intersection of a and b. If the boxes do not intersect, the resulting bounding box is invalid.

◆ operator<<()

std::ostream& GEOM_FADE25D::operator<< ( std::ostream &  stream,
const Bbox2 pC 
)
inline
Parameters
streamThe output stream
pCThe bounding box to print.
Returns
The output stream