pvigier / quadtree Goto Github PK
View Code? Open in Web Editor NEWA simple and modern C++ quadtree implementation
Home Page: https://pvigier.github.io/2019/07/28/quadtree-collision-detection.html
License: MIT License
A simple and modern C++ quadtree implementation
Home Page: https://pvigier.github.io/2019/07/28/quadtree-collision-detection.html
License: MIT License
Hi,
I am trying to make a unsigned int quadtree. In the template, I put unsigned in the last parameter. Everywhere is the code it uses the "Float" type except a single place in the constructor (Quadtree.h Line:24)
Was that intended? Is it even possible to do a unsigned quadtree?
Thanks!
Beurnii
I have a collection (10,000s) of 2d quadrilateral shapes/polygon
I have a collection (millions) of 2d points
I would like to know if this library is suitable for me quickly find (for each 2d point) which quadrilateral it intersects/bounds with or possibly no intersection at all.
If it is possible, which example or function call would you recommend I focus on to study deeper ?
Hi Pierre,
Thank you for providing such a well packaged implementation of quadtrees. However, I would like to kindly ask you to include dependencies of the project in the readme file, in order to get it running quickly in a linux machine. I personally had to spend a few hours figuring out how to build your project using cmake, because of some dependencies which I was not aware of and then didn't know how to easily install them. To be specific, I'm working on an Ubuntu 20 machine with x64 CPU and the dependencies I had to install were Google Benchmark and Google Test C++ libraries using apt package manager:
sudo apt install libbenchmark-dev libgtest-dev
So far these are the dependencies I discovered and should there be more, please let us know :)
You use std::array in Quadtree.h but don't include it.
when remove a value, the code tryMerge parent. However, grandparent may need to merge too and there is no code for tryMerge grandparent.
constexpr bool contains(const Box<T>& box) const noexcept
{
return left <= box.left && box.getRight() <= getRight() &&
**top <= box.top** && box.getBottom() <= getBottom();
}
I think it should be
constexpr bool contains(const Box<T>& box) const noexcept
{
return left <= box.left && box.getRight() <= getRight() &&
**top >= box.top** && box.getBottom() <= getBottom();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.