| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tlp::QuadTreeNode< TYPE > Class Template Reference QuadTree template class. More...
Collaboration diagram for tlp::QuadTreeNode< TYPE >:
Public Member Functions
Detailed Descriptiontemplate<class TYPE>
|
tlp::QuadTreeNode< TYPE >::QuadTreeNode | ( | const tlp::Rectangle< float > & | box | ) | [inline] |
Contructor, you have to put the global bounding box of the quadtree
tlp::QuadTreeNode< TYPE >::~QuadTreeNode | ( | ) | [inline] |
Basic destructor
void tlp::QuadTreeNode< TYPE >::getElements | ( | const tlp::Rectangle< float > & | box, |
std::vector< TYPE > & | result | ||
) | const [inline] |
return all elements that could be in the given box (the function ensures that all elements inside the box are return. However some elements not inside the box can be returned.
void tlp::QuadTreeNode< TYPE >::getElements | ( | std::vector< TYPE > & | result | ) | const [inline] |
Return all elements of the quadtree
void tlp::QuadTreeNode< TYPE >::getElementsWithRatio | ( | const tlp::Rectangle< float > & | box, |
std::vector< TYPE > & | result, | ||
float | ratio = 1000. |
||
) | const [inline] |
same as getElements, however if the size of the elements are to small compare to the size of the box (equivalent to have severeal item at the same position on the screen) only one elements is returned for the small cells. The ratio should fixed according to the number of pixels displayed. If we have a 1000*800 screen we can merge items of box into a single item if the size of box is max(1000,800) times smaller than the box given in parameter. so the ratio should be 1000.(merge elements that are 1000 times smaller
void tlp::QuadTreeNode< TYPE >::insert | ( | const tlp::Rectangle< float > & | box, |
const TYPE | id | ||
) | [inline] |
Insert an element in the quadtree
Tulip Software by LaBRI Visualization Team 2001 - 2012 |