Open CASCADE Technology  6.9.0
Public Member Functions

Bnd_BoundSortBox Class Reference

A tool to compare a bounding box or a plane with a set of 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. More...

#include <Bnd_BoundSortBox.hxx>

Public Member Functions

 Bnd_BoundSortBox ()
 Constructs an empty comparison algorithm for bounding boxes. The bounding boxes are then defined using the Initialize function. More...
 
void Initialize (const Bnd_Box &CompleteBox, const Handle< Bnd_HArray1OfBox > &SetOfBox)
 Initializes this comparison algorithm with. More...
 
void Initialize (const Handle< Bnd_HArray1OfBox > &SetOfBox)
 Initializes this comparison algorithm with. More...
 
void Initialize (const Bnd_Box &CompleteBox, const Standard_Integer nbComponents)
 Initializes this comparison algorithm, giving it only. More...
 
void Add (const Bnd_Box &theBox, const Standard_Integer boxIndex)
 Adds the 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. More...
 
const TColStd_ListOfIntegerCompare (const Bnd_Box &theBox)
 Compares the 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. More...
 
const TColStd_ListOfIntegerCompare (const gp_Pln &P)
 Compares the plane P 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. More...
 
void Dump () const
 
void Destroy ()
 
 ~Bnd_BoundSortBox ()
 

Detailed Description

A tool to compare a bounding box or a plane with a set of 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.

Constructor & Destructor Documentation

Bnd_BoundSortBox::Bnd_BoundSortBox ( )

Constructs an empty comparison algorithm for bounding boxes. The bounding boxes are then defined using the Initialize function.

Bnd_BoundSortBox::~Bnd_BoundSortBox ( )
inline

Member Function Documentation

void Bnd_BoundSortBox::Add ( const Bnd_Box theBox,
const Standard_Integer  boxIndex 
)

Adds the 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 already exists at position boxIndex in the array of boxes to be sorted by this comparison algorithm.
const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare ( const Bnd_Box theBox)

Compares the 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.

const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare ( const gp_Pln P)

Compares the plane P 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.

void Bnd_BoundSortBox::Destroy ( )
void Bnd_BoundSortBox::Dump ( ) const
void Bnd_BoundSortBox::Initialize ( const Bnd_Box CompleteBox,
const Handle< Bnd_HArray1OfBox > &  SetOfBox 
)

Initializes this comparison algorithm with.

  • the set of bounding boxes SetOfBox.
void Bnd_BoundSortBox::Initialize ( const Handle< Bnd_HArray1OfBox > &  SetOfBox)

Initializes this comparison algorithm with.

  • the set of bounding boxes SetOfBox, where CompleteBox is given as the global bounding box of SetOfBox.
void Bnd_BoundSortBox::Initialize ( const Bnd_Box CompleteBox,
const Standard_Integer  nbComponents 
)

Initializes this comparison algorithm, giving it only.

  • the maximum number nbComponents of the bounding boxes to be managed. Use the Add function to define the array of bounding boxes to be sorted by this algorithm.

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