Quadtree and size of region in constructor

I was reading nice tutorial about Quadtree from this site and now is my question.

When I create quadtree I have to pass in constructor bounds of the screen, well What if my map's size 10000 x 10000px and game screen is 1280 x 720px, what should I pass?

Quadtree quad = new Quadtree(0, new Rectangle(0,0,600,600));

So in this example the screen region is just 600 x 600px. And it's working perfectly until player will go further than 600x600

I'm using c++ SFML 2.0, where sf::View is center to player position.


You should pass the bounds of the whole map, regardless of whether parts of the region can be seen or not.

Need Your Help

How to signal when a view is done and returning?

objective-c xcode

I'm building an iphone app, and i have my first view call a second view when a button is pressed. The second view is a UIPicker with a button. When the button is pressed, I want to return the data ...

Errors when execute `yo angular appname` in the VirtualBox Guest OS Shared Folder

node.js virtualbox symlink yeoman

I am using VirtualBox 4.2.8 and running inside Mac OS X 10.7.5 as the Host OS.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.