Distance from point to 3D model

classic Classic list List threaded Threaded
2 messages Options
utang utang
Reply | Threaded
Open this post in threaded view
|

Distance from point to 3D model

Hello. I am looking for your help.
I have the following problem: it is necessary to find the distance from the point to the 3D model. In fact, this is the distance from the point to the nearest triangle. Tell me how this can be implemented using OSG or osgEarth.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Distance from point to 3D model

utang,
This is an OSG function, and there is no "built-in" way to do it that I know of.

You will need to visit all the triangles in your model and find the closest one. Maybe osg::PrimitiveFunctor can help you traverse the model.

Good luck
Glenn Waldron / Pelican Mapping