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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top