HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_RTreeImpl.h File Reference
#include "UT_UniquePtr.h"
#include <utility>
+ Include dependency graph for UT_RTreeImpl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UT_BoxedItemT< BOX, ITEM_INDEX_REP >
 
class  UT::RNodeT< ITEM_INDEX_REP, MAX_ORDER >
 
struct  UT::PartitionForSubtrees< BOX, ITEM_INDEX_REP >
 
struct  UT::SubtreeForEachIntersectingItem< ITEM_INDEX, MAX_ORDER >
 

Namespaces

 UT
 

Typedefs

using Box = UT_BoxT< FT >
 
using BoxedItem = UT_BoxedItemT< Box, ItemIndexRep >
 

Functions

template<typename BOX >
void computeBoundingBox (BOX &bounding_box, const BOX *const begin, const BOX *const end)
 
template<typename BOX , typename ITEM_INDEX_REP >
void computeBoundingBoxItem (BOX &bounding_box, const UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const begin, const UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const end)
 
size_t UT::subtreeDetermineNumNodes (const int MAX_ORDER, const size_t size)
 
template<typename BOX , typename ITEM_INDEX_REP , int MAX_ORDER>
RNodeT< ITEM_INDEX_REP,
MAX_ORDER > * 
UT::subtreeCreate (BOX &bounding_box, BOX shared_boxes[], UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const begin, UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const end, RNodeT< ITEM_INDEX_REP, MAX_ORDER > shared_nodes[], RNodeT< ITEM_INDEX_REP, MAX_ORDER > *&shared_nodes_end)
 
template<typename ITEM_INDEX_REP , int MAX_ORDER, typename ITEM_BOX , typename FT >
void UT::subtreeAssignItemBoxArray (UT_BoxT< FT > &bounding_box, UT_BoxT< FT > shared_boxes[], const RNodeT< ITEM_INDEX_REP, MAX_ORDER > shared_nodes[], const RNodeT< ITEM_INDEX_REP, MAX_ORDER > *const node, ITEM_BOX &&item_box)
 
template<typename ITEM_INDEX_REP , int MAX_ORDER>
exint UT::subtreeComputeMaxDepth (const RNodeT< ITEM_INDEX_REP, MAX_ORDER > shared_nodes[], const RNodeT< ITEM_INDEX_REP, MAX_ORDER > *const node)
 
 SYS_STATIC_ASSERT (MAX_ORDER >=2)
 
 UT_ASSERT (myNumItems >=0)
 
 UT_ASSERT (myNumItems< (ItemIndexRep(1)<< ((8 *sizeof(ItemIndexRep))-2)))
 
std::unique_ptr< BoxedItem[] > boxed_items (std::make_unique< BoxedItem[] >(myNumItems))
 
 for (ItemIndexRep i=0;i< myNumItems;++i)
 
 if (num_boxed_items<=0)
 
std::unique_ptr< Box[] > shared_boxes (std::make_unique< Box[] >(MAX_ORDER *myNumNodes))
 
 UT_ASSERT (shared_nodes_end-myNodes.get()==myNumNodes)
 
 UT_ASSERT (myNumNodes > 0)
 
 UT_ASSERT (myNodes!=nullptr)
 
 UT_ASSERT ((myNodes.get()<=myRoot)&&(myRoot< myNodes.get()+myNumNodes))
 
template<typename FT >
UT_RTree16Int UTconstructRTree16Int (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTree2Int UTconstructRTree2Int (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTreeInt UTconstructRTreeInt (const UT_BoxT< FT > item_box[], const UT_RTreeInt::ItemIndex num_items)
 
template<typename FT >
UT_RTreeInt UTconstructRTreeInt (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTree UTconstructRTree (const UT_BoxT< FT > item_box[], const UT_RTree::ItemIndex num_items)
 
template<typename FT >
UT_RTree UTconstructRTree (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTree2IntConfigurationT< FT > UTconstructRTree2IntConfiguration (const UT_RTree2Int &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTree16IntConfigurationT< FT > UTconstructRTree16IntConfiguration (const UT_RTree16Int &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTreeIntConfigurationT< FT > UTconstructRTreeIntConfiguration (const UT_RTreeInt &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
UT_RTreeIntConfigurationT< FT > UTconstructRTreeIntConfiguration (const UT_RTreeInt &tree, const UT_BoxT< FT > item_box[], const UT_RTree::ItemIndex num_items)
 
template<typename FT >
UT_RTreeConfigurationT< FT > UTconstructRTreeConfiguration (const UT_RTree &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTree2Int (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTree16Int (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTreeInt (const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTreeInt (const UT_BoxT< FT > item_box[], const UT_RTree::ItemIndex num_items)
 
template<typename FT >
auto UTmakeUniqueRTree2IntConfiguration (const UT_RTree2Int &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTree16IntConfiguration (const UT_RTree16Int &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTreeIntConfiguration (const UT_RTreeInt &tree, const UT_Array< UT_BoxT< FT > > &item_box)
 
template<typename FT >
auto UTmakeUniqueRTreeIntConfiguration (const UT_RTreeInt &tree, const UT_BoxT< FT > item_box[], const UT_RTree::ItemIndex num_items)
 

Variables

 num_items
 
ItemIndexRep num_boxed_items = 0
 
 myNumNodes = subtreeDetermineNumNodes( MAX_ORDER, num_boxed_items )
 
 myNodes = std::make_unique< Node[] >( myNumNodes )
 
Box bounding_box_root
 
Nodeshared_nodes_end = myNodes.get()
 
 myRoot
 

Typedef Documentation

using Box = UT_BoxT< FT >

Definition at line 674 of file UT_RTreeImpl.h.

using BoxedItem = UT_BoxedItemT< Box, ItemIndexRep >

Definition at line 675 of file UT_RTreeImpl.h.

Function Documentation

std::unique_ptr< BoxedItem[] > boxed_items ( std::make_unique< BoxedItem[] >  myNumItems)
template<typename BOX >
void computeBoundingBox ( BOX &  bounding_box,
const BOX *const  begin,
const BOX *const  end 
)
inline

Definition at line 63 of file UT_RTreeImpl.h.

template<typename BOX , typename ITEM_INDEX_REP >
void computeBoundingBoxItem ( BOX &  bounding_box,
const UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const  begin,
const UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const  end 
)
inline

Definition at line 80 of file UT_RTreeImpl.h.

for ( )

Definition at line 685 of file UT_RTreeImpl.h.

if ( num_boxed_items<=  0)
Examples:
field3d/f3d_io.C.

Definition at line 697 of file UT_RTreeImpl.h.

std::unique_ptr< Box[] > shared_boxes ( std::make_unique< Box[] >  MAX_ORDER *myNumNodes)
SYS_STATIC_ASSERT ( MAX_ORDER >=  2)
UT_ASSERT ( myNumItems >=  0)
UT_ASSERT ( )
UT_ASSERT ( shared_nodes_end-myNodes.  get() = =myNumNodes)
UT_ASSERT ( myNumNodes  ,
 
)
UT_ASSERT ( myNodes!  = nullptr)
UT_ASSERT ( (myNodes.get()<=myRoot)&&(myRoot< myNodes.get()+myNumNodes )
template<typename FT >
UT_RTree UTconstructRTree ( const UT_BoxT< FT >  item_box[],
const UT_RTree::ItemIndex  num_items 
)
inline

Definition at line 990 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTree UTconstructRTree ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 996 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTree16Int UTconstructRTree16Int ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 966 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTree16IntConfigurationT< FT > UTconstructRTree16IntConfiguration ( const UT_RTree16Int tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1008 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTree2Int UTconstructRTree2Int ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 972 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTree2IntConfigurationT< FT > UTconstructRTree2IntConfiguration ( const UT_RTree2Int tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1002 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTreeConfigurationT< FT > UTconstructRTreeConfiguration ( const UT_RTree tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1026 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTreeInt UTconstructRTreeInt ( const UT_BoxT< FT >  item_box[],
const UT_RTreeInt::ItemIndex  num_items 
)
inline

Definition at line 978 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTreeInt UTconstructRTreeInt ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 984 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTreeIntConfigurationT< FT > UTconstructRTreeIntConfiguration ( const UT_RTreeInt tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1014 of file UT_RTreeImpl.h.

template<typename FT >
UT_RTreeIntConfigurationT< FT > UTconstructRTreeIntConfiguration ( const UT_RTreeInt tree,
const UT_BoxT< FT >  item_box[],
const UT_RTree::ItemIndex  num_items 
)
inline

Definition at line 1020 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTree16Int ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 1038 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTree16IntConfiguration ( const UT_RTree16Int tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1062 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTree2Int ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 1032 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTree2IntConfiguration ( const UT_RTree2Int tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1056 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTreeInt ( const UT_Array< UT_BoxT< FT > > &  item_box)
inline

Definition at line 1044 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTreeInt ( const UT_BoxT< FT >  item_box[],
const UT_RTree::ItemIndex  num_items 
)
inline

Definition at line 1050 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTreeIntConfiguration ( const UT_RTreeInt tree,
const UT_Array< UT_BoxT< FT > > &  item_box 
)
inline

Definition at line 1068 of file UT_RTreeImpl.h.

template<typename FT >
auto UTmakeUniqueRTreeIntConfiguration ( const UT_RTreeInt tree,
const UT_BoxT< FT >  item_box[],
const UT_RTree::ItemIndex  num_items 
)

Definition at line 1074 of file UT_RTreeImpl.h.

Variable Documentation

Box bounding_box_root

Definition at line 711 of file UT_RTreeImpl.h.

myNodes = std::make_unique< Node[] >( myNumNodes )

Definition at line 708 of file UT_RTreeImpl.h.

myNumNodes = subtreeDetermineNumNodes( MAX_ORDER, num_boxed_items )

Definition at line 707 of file UT_RTreeImpl.h.

myRoot
Initial value:
shared_boxes.get(),
myNodes.get(),
)
myNodes
Definition: UT_RTreeImpl.h:708
RNodeT< ITEM_INDEX_REP, MAX_ORDER > * subtreeCreate(BOX &bounding_box, BOX shared_boxes[], UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const begin, UT_BoxedItemT< BOX, ITEM_INDEX_REP > *const end, RNodeT< ITEM_INDEX_REP, MAX_ORDER > shared_nodes[], RNodeT< ITEM_INDEX_REP, MAX_ORDER > *&shared_nodes_end)
Definition: UT_RTreeImpl.h:319
Node * shared_nodes_end
Definition: UT_RTreeImpl.h:714
std::unique_ptr< BoxedItem[] > boxed_items(std::make_unique< BoxedItem[] >(myNumItems))
Box bounding_box_root
Definition: UT_RTreeImpl.h:711
ItemIndexRep num_boxed_items
Definition: UT_RTreeImpl.h:684
std::unique_ptr< Box[] > shared_boxes(std::make_unique< Box[] >(MAX_ORDER *myNumNodes))

Definition at line 716 of file UT_RTreeImpl.h.

ItemIndexRep num_boxed_items = 0

Definition at line 684 of file UT_RTreeImpl.h.

num_items
Initial value:
{
using ItemIndexRep = ItemIndex_UnderlyingIntegerType_t< ITEM_INDEX >

Definition at line 672 of file UT_RTreeImpl.h.

Node* shared_nodes_end = myNodes.get()

Definition at line 714 of file UT_RTreeImpl.h.