Jump to content
  • Advertisement
Sign in to follow this  
Toolmaker

QuadTree - Accessibility do and don'ts

This topic is 4355 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just finished writing a QuadTree. While it wasn't overly difficult, I'm still wondering a bit about giving access to the data. Right now, I'm writing the function to access a node by it's position(This is C#), ie T t = quadTree[10, 10]; However, should I allow the user of the tree allow direct access to nodes? Or just add functionality such as ForEach to just iterate ALL the data, or iterate the data within a specific zone. Some feedback would be nice. Toolmaker

Share this post


Link to post
Share on other sites
Advertisement
It depends on the purpose I guess. If this is just part of some project, then you may as well just do whatever you need to for the project. If it is part of some library that may be used by other things then you may want to consider it, if you can see a real use for it.
I think that you're in more of a position to decide than anyone else at the moment. I would probably apply YAGNI

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!