I am working on a project for my research where I would need to write a C++ program that calculates whether-or-not a point lies inside an STL object.
To do this, I would like to port you code over to C++, but I didn't want to do this without your permission since the BSD license says that I should not modify the source code.
If you would be alright with me porting it to C++ and using it for my own research, please let me know by emailing me at firstname.lastname@example.org .
Thanks a lot for making this program available!
Oh, and if it's not too much trouble, could you also include a .txt with any copyright and credits that you'd like me to include in my program.
Thanks again! :)
John, Sven, thanks for the reply.
The reason why I put "exactly" within quotation marks is because I intended implicitly a check considering a tolerance. Since I saw it is possible to specify a TOL parameter to inpolyhedron, I thought it could have been used also for checking whether a point is on the surface within a tolerance, hence the use of "exactly" ;-)
Anyway, again, compliments for the code!
Hi Bart, I don't think this would be an easy extension since inpolyhedron uses Z-ray (vertical vector) intersections whereas surface distances would be calculated via arbitrary 3D face normal vectors.
Perhaps inpolyhedron would be a useful first filter if you considered all points inside a surface as having zero distance, but it wouldn't save computation for actually computing that distance.
It sounds like an interesting problem with similar performance issues to inpolyhedron. A related question with a proposed algorithm is here: http://stackoverflow.com/questions/18230259/computing-distance-from-a-point-to-a-triangulation-in-3d-with-matlab