// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Bnd_BoundSortBox2d_HeaderFile #define _Bnd_BoundSortBox2d_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Bnd_Box2d_HeaderFile #include #endif #ifndef _Handle_Bnd_HArray1OfBox2d_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Handle_TColStd_HArray1OfListOfInteger_HeaderFile #include #endif #ifndef _TColStd_DataMapOfIntegerInteger_HeaderFile #include #endif #ifndef _TColStd_ListOfInteger_HeaderFile #include #endif class Bnd_HArray1OfBox2d; class TColStd_HArray1OfListOfInteger; class Standard_NullValue; class Standard_MultiplyDefined; class Bnd_Box2d; class TColStd_ListOfInteger; //! 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.
class Bnd_BoundSortBox2d { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Constructs an empty comparison algorithm for 2D bounding boxes.
//! The bounding boxes are then defined using the Initialize function.
Standard_EXPORT Bnd_BoundSortBox2d(); //! Initializes this comparison algorithm with
//! - the set of 2D bounding boxes SetOfBox
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, where
//! CompleteBox is given as the global bounding box of SetOfBox.
Standard_EXPORT void Initialize(const Handle(Bnd_HArray1OfBox2d)& SetOfBox) ; //! 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 Initialize(const Bnd_Box2d& CompleteBox,const Standard_Integer nbComponents) ; //! 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 void Add(const Bnd_Box2d& theBox,const Standard_Integer boxIndex) ; //! 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 const TColStd_ListOfInteger& Compare(const Bnd_Box2d& theBox) ; Standard_EXPORT void Dump() const; protected: private: //! Prepares BoundSortBox2d and sorts the rectangles of
//! .
Standard_EXPORT void SortBoxes() ; 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; }; // other Inline functions and methods (like "C++: function call" methods) #endif