# FoundationClasses
TKMath
Bnd

# Bnd_BoundSortBox2d Class Reference

A tool to compare a 2D bounding box with a set of 2D
bounding boxes. It sorts the set of bounding boxes to give
the list of boxes which intersect the element being compared.
The boxes being sorted generally bound a set of shapes,
while the box being compared bounds a shape to be
compared. The resulting list of intersecting boxes therefore
gives the list of items which potentially intersect the shape to be compared.
.

`#include <Bnd_BoundSortBox2d.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | Bnd_BoundSortBox2d ()
| Constructs an empty comparison algorithm for 2D bounding boxes. The bounding boxes are then defined using the Initialize function. .
Standard_EXPORT void | Initialize (const Bnd_Box2d &CompleteBox, const Handle(Bnd_HArray1OfBox2d)&SetOfBox)
| Initializes this comparison algorithm with - the set of 2D bounding boxes SetOfBox .
Standard_EXPORT void | Initialize (const Handle(Bnd_HArray1OfBox2d)&SetOfBox)
| Initializes this comparison algorithm with - the set of 2D bounding boxes SetOfBox, where CompleteBox is given as the global bounding box of SetOfBox. .
Standard_EXPORT void | Initialize (const Bnd_Box2d &CompleteBox, const Standard_Integer nbComponents)
| Initializes this comparison algorithm, giving it only - the maximum number nbComponents, and - the global bounding box CompleteBox, of the 2D bounding boxes to be managed. Use the Add function to define the array of bounding boxes to be sorted by this algorithm. .
Standard_EXPORT void | Add (const Bnd_Box2d &theBox, const Standard_Integer boxIndex)

Adds the 2D bounding box theBox at position boxIndex in
the array of boxes to be sorted by this comparison algorithm.
This function is used only in conjunction with the third
syntax described in the synopsis of Initialize.
Exceptions
- Standard_OutOfRange if boxIndex is not in the
range [ 1,nbComponents ] where
nbComponents is the maximum number of bounding
boxes declared for this comparison algorithm at
initialization.
- Standard_MultiplyDefined if a box still exists at
position boxIndex in the array of boxes to be sorted by
this comparison algorithm.
.

Standard_EXPORT const TColStd_ListOfInteger & | Compare (const Bnd_Box2d &theBox)
| Compares the 2D bounding box theBox with the set of bounding boxes to be sorted by this comparison algorithm, and returns the list of intersecting bounding boxes as a list of indexes on the array of bounding boxes used by this algorithm. .
Standard_EXPORT void | Dump () const

## Private Member Functions

Standard_EXPORT void | SortBoxes ()
| Prepares BoundSortBox2d and sorts the rectangles of <setofbox> . .

## Private Attributes

Bnd_Box2d | myBox
Handle_Bnd_HArray1OfBox2d | myBndComponents
Standard_Real | Xmin
Standard_Real | Ymin
Standard_Real | deltaX
Standard_Real | deltaY
Standard_Integer | discrX
Standard_Integer | discrY
Handle_TColStd_HArray1OfListOfInteger | axisX
Handle_TColStd_HArray1OfListOfInteger | axisY
Standard_Integer | theFound
TColStd_DataMapOfIntegerInteger | Crible
TColStd_ListOfInteger | lastResult

## Constructor & Destructor Documentation

Standard_EXPORT Bnd_BoundSortBox2d::Bnd_BoundSortBox2d | ( |  | ) |

## Member Function Documentation

Standard_EXPORT void Bnd_BoundSortBox2d::Add | ( | const Bnd_Box2d & | theBox,
|  | const Standard_Integer | boxIndex
| ) |

Standard_EXPORT const TColStd_ListOfInteger& Bnd_BoundSortBox2d::Compare | ( | const Bnd_Box2d & | theBox | ) |

Standard_EXPORT void Bnd_BoundSortBox2d::Dump | ( |  | ) | const

Standard_EXPORT void Bnd_BoundSortBox2d::Initialize | ( | const Bnd_Box2d & | CompleteBox,
|  | const Standard_Integer | nbComponents
| ) |

Standard_EXPORT void Bnd_BoundSortBox2d::Initialize | ( | const Handle(Bnd_HArray1OfBox2d)& | SetOfBox | ) |

Standard_EXPORT void Bnd_BoundSortBox2d::Initialize | ( | const Bnd_Box2d & | CompleteBox,
|  | const Handle(Bnd_HArray1OfBox2d)& | SetOfBox
| ) |

void Bnd_BoundSortBox2d::operator delete | ( | void * | anAddress | ) | `[inline]`

void* Bnd_BoundSortBox2d::operator new | ( | size_t | size | ) | `[inline]`

void* Bnd_BoundSortBox2d::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT void Bnd_BoundSortBox2d::SortBoxes | ( |  | ) | `[private]`

## Field Documentation

Handle_TColStd_HArray1OfListOfInteger Bnd_BoundSortBox2d::axisX `[private]`

Handle_TColStd_HArray1OfListOfInteger Bnd_BoundSortBox2d::axisY `[private]`

TColStd_DataMapOfIntegerInteger Bnd_BoundSortBox2d::Crible `[private]`

Standard_Real Bnd_BoundSortBox2d::deltaX `[private]`

Standard_Real Bnd_BoundSortBox2d::deltaY `[private]`

Standard_Integer Bnd_BoundSortBox2d::discrX `[private]`

Standard_Integer Bnd_BoundSortBox2d::discrY `[private]`

TColStd_ListOfInteger Bnd_BoundSortBox2d::lastResult `[private]`

Handle_Bnd_HArray1OfBox2d Bnd_BoundSortBox2d::myBndComponents `[private]`

Bnd_Box2d Bnd_BoundSortBox2d::myBox `[private]`

Standard_Integer Bnd_BoundSortBox2d::theFound `[private]`

Standard_Real Bnd_BoundSortBox2d::Xmin `[private]`

Standard_Real Bnd_BoundSortBox2d::Ymin `[private]`

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

- Bnd_BoundSortBox2d.hxx