Intro to Quadtree
🔗 Code Example: Quadtree (Part 1 of 2)
🔗 References:
Inspiration - Chris Barber's Adrift
OpenFrameworks - Creative coding tool in C++ used to make Adrift
The Coding Train's Quadtree Series:
🔗 Timestamps:
0:10 Inspiration for the tutorial
1:06 Agenda
1:49 What is a quadtree?
3:19 Let's start coding
3:58 Create a Point class to represent a simple coordinate (x, y)
4:19 Create a Rect class for a rectangular bounding box
4:58 Create a Quadtree class with 3 main methods (insert, subdivide, and query)
6:29 Write an Insert method
14:08 Write a Subdivide method
23:02 Write a Query method
30:02 Fix a bug
32:41 Create a Circle class for a circular bounding box
40:52 Create a Particle class
47:37 Call collision detection without a quadtree (oh no!)
50:53 Call collision detection with a quadtree (oh yes!)
57:42 Moment of truth