PDA

View Full Version : Octrees and kd-trees


djlane
02-12-2009, 02:43 PM
Hi all,

I've been working on a script that uses alot of raycasting on meshes and it seems by reading some of the threads here that there may be an alternative solution using kd-trees and octrees. Apart from reading those things up on wikipedia I was still not sure how you translate that approach into maxscript function.

my initial thoughts are you loop though objects faces or vertex and use polyOp.getFaceCenter / polyOp.getVert to get a position and test if it is within the bounds of a leaf node (not sure if thats the right terminolgy)?

I know its a big ask but if anyone has any tips or pointers or know of any free scripts i can take apart then that would be great.

thanks for reading

Dan

CGTalk Moderation
02-12-2009, 02:43 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.