Question

I've read k-d tree description in wiki, wiki says that k-d tree keep points. I have mesh of triangles and need some structure for effective calculation intersections with cylinder and distance to point queries. As I understand, if I split my mesh by the plane - many triangles can intersect that plane. So what shoud I do? Put copies of triangles in left and right child boxes, or split intersected triangles?

Was it helpful?

Solution

You need to split intersected triangles. Take a look at any open-source Ray-Tracing algorithms which use KD-Trees for how to do this, or search for academic papers on Google Scholar.

Take a look at the Surface Area Heuristic for a good way to choose splitting planes, it is generally used in Ray Tracing but it may be applicable in your situation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top