Notifications
Clear all
[Closed] Octrees and kd-trees
Feb 12, 2009 2: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