Skip to content

LukeWebb99/QuadTree-Example-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuadTree-Example-C

Part 3 of 3 examples of a working Quadtree using C++ & SFML, this exmaple is basic showing random points plotted on the window then being sorted into the tree then using a query we can now test for collisions as the random points randomly walk around, this will be shown by highlighting the points white.

Reference https://en.wikipedia.org/wiki/Quadtree#:~:text=A%20quadtree%20is%20a%20tree,into%20four%20quadrants%20or%20regions.&text=A%20similar%20partitioning%20is%20also%20known%20as%20a%20Q%2Dtree.

Preview

alt text

Dependencies

Project uses vcpkg this allows for a smaller download size

vcpkg install sfml

How to Use

build x84 and run

About

Example of using a quadtree for checking collision per frame, this project demonstration how building a quadtree per frame then using it to check for small groups of collisions is faster then checking every possible collisions each frame

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages