Coder Social home page Coder Social logo

quadtree_simple's Introduction

C++ Simple Quadtree implementation

Offers everything a quadtree has to offer.

Bonuses

  • Closest point finder (requires the point to have the distance function (see Customizations).
  • Stocks a value in pair with a point.

Customizations

  1. To customize the max count of points for each subtree
  • check quadtree.hpp
  • Modify QT_NODE_CAPACITY to a value that you like.
  1. You can use your own point.
  • Make sure it implements the < operator.
  • Make sure it implements the distance function.
  1. Using your own quadtree Shape (Default = Square)
  • Modify AABB struct to your desire
  • Make sure intersectsAABB - containsPoint works as desired

Disclaimer

This version of Quadtree is meant to be simple. It has yet a lot to offer to those who can modify it accordingly. It was strongly inspired by the pseudo code proposed on Wikipedia.

  • It wasn't thouroughly tested, therefore many bugs may or may not be present.
  • I am not responsible if it crashes (somehow) your pc.
  • I am not responsible if you can't read c++ code or don't like my coding style.
  • Feel free to propose changes and / or enhancements.

quadtree_simple's People

Contributors

scriptodude avatar

Stargazers

Evgeny avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.