Description: If you map the map into blocks, you filter only the units in the block covered by the range, thus reducing many unnecessary filters. Four fork tree can solve this problem effectively.
Each layer of the tree divides the map into four blocks. The size of the tree is determined by the size of the map, and the larger the number of layers, the smaller the division.
When you need to filter a range of units, you only need to locate the tree area that intersects the range, and then filter the objects in the area.
To Search:
File list (Check if you may need any files):
四叉树
四叉树\Demo.exe
四叉树\cfg.ini
四叉树\src
四叉树\src\Debug
四叉树\src\Debug\vc60.idb
四叉树\src\Debug\vc60.pdb
四叉树\src\main.cpp
四叉树\src\main.dsp
四叉树\src\main.dsw
四叉树\src\main.ncb
四叉树\src\main.opt
四叉树\src\main.plg
四叉树\src\mmc
四叉树\src\mmc\base.h
四叉树\src\mmc\math.h
四叉树\src\mmc\tree4.h
四叉树\src\win
四叉树\src\win\Window.cpp
四叉树\src\win\Window.h
四叉树\win
四叉树\win\Tree4Demo.sln
四叉树\win\Tree4Demo.vcxproj
四叉树\win\Tree4Demo.vcxproj.filters