munificent / game-programming-patterns

Source repo for the book
http://gameprogrammingpatterns.com/
Other
4.03k stars 495 forks source link

Incorrect statement in the Spatial Partition chapter #381

Open iglind opened 5 months ago

iglind commented 5 months ago

Adding a single object can never trigger more than one subdivision.

Imagine all your objects are in the vicinity of the top left corner of the square, and you are adding an object in the same area. This action triggers subdivision. After subdivision all objects are in one (top left) sub-square, and you have to make subdivision again. And, maybe, again, and again...

munificent commented 5 months ago

You're exactly right and I never considered that. I'm not actively working on the book, but if I ever get around to doing a second edition, I'll address this.