Skip to main content
GameDev.net gamedev.net
🔒 Locked

Accelerating distance calculations with a QuadTree

Started by jamesw May 10, 2006 at 11:40 PM 1 replies 1.5k views
Original Post
jamesw
jamesw
I have my outside world partitioned by a quadtree. I need to find the distance to each object to determine what LOD to use. Is there a way to use the quadtree to optimize this process?
uncutno
uncutno
#1
Let every object store their last distance

#2
Update realy close objects distances every frame

#3
Update close objects distances every 5fth frame

#4
Update objects distances far away every second

There you have it, x16 in speed!
-Anders-Oredsson-Norway-
m4gnus
m4gnus
you could store the distance from a patch of your quadtree to the camera and use that distance for all objects on that patch.

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.