+
+
+
+ /*!
+ * \brief Class encapsulating BBTree of dimension given at construction and
+ * providing all features of BBTree
+ */
+ class BBTreeOfDim
+ {
+ void * _tree;
+ void (BBTreeOfDim::*_PgetElementsAroundPoint)( const double* coordsPtr,
+ std::vector<mcIdType>& elems ) const;
+ void (BBTreeOfDim::*_PgetIntersectingElems)( const double* bb,
+ std::vector<mcIdType>& elems ) const;
+
+ template< int dim>
+ void _getElementsAroundPoint( const double* coordsPtr,
+ std::vector<mcIdType>& elems ) const
+ {
+ ((BBTree<dim,mcIdType>*)_tree)->getElementsAroundPoint( coordsPtr, elems );
+ }
+ template< int dim>
+ void _getIntersectingElems(const double* bb,
+ std::vector<mcIdType>& elems) const
+ {
+ ((BBTree<dim,mcIdType>*)_tree)->getIntersectingElems( bb, elems );
+ }
+ public:
+
+ BBTreeOfDim( std::size_t dim,
+ const double* bbs,
+ mcIdType* elems,
+ int level,
+ mcIdType nbelems,
+ double epsilon=1e-12);
+ ~BBTreeOfDim();
+ void getElementsAroundPoint(const double* coordsPtr, std::vector<mcIdType>& elems ) const;
+ void getIntersectingElems (const double* bb, std::vector<mcIdType>& elems) const;
+ };