Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Find n nearest objects

This topic is 5243 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Basicly, I am trying to find at least n nearest objects in 3d. Because of the very large possible size of searched list, I am wondering is there any quicker method than simply trying to find distance from each of them. Some sort of spatial structure maybe(octrees nor any form of kd trees will suffice here I think)?

Share this post


Link to post
Share on other sites
Advertisement
Define 'objects'. Are they all of uniform size? Do they widely vary? How do you define your 'closeness' criteria - will the centre do, or do you need the actual closest point on each object? does it need to be exact? etc. etc.

For uniform objects where you can take the central point, I don't see why a (balanced) kd-tree won't suffice.

[edited by - JuNC on January 12, 2004 4:51:18 PM]

Share this post


Link to post
Share on other sites
Each object is described with sphere. Yes, their centres will be enough(not their closest point although that can be added).

dist = x*x+y*y+z*z

What is a balanced kd-tree?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!