Intersect between Surface and Ray

We are searching data for your request:
Upon completion, a link will appear to access the found materials.
I am interested in finding the intersection of a Ray and a Surface in ArcObjects.
I already know of two solutions. First solution is to use theLocate
method of ISurface:
Dim intersectionPoint As IPoint = surface.Locate(ray, hint)
The other solution is to use theGetLineOfSight
method of IGeoDatabaseBridge (where the variablepoint
is a calculated point along the path of the ray):
Dim geoDatabaseBridge2 As IGeoDatabaseBridge2 = New GeoDatabaseHelper geoDatabaseBridge2.GetLineOfSight(surface, baseRay.Origin, point, intersectionPoint, Nothing, Nothing, Nothing, False, False)
Surprisingly, theGetLineOfSight
method is much faster than thelocate
method. But I am looking for an even faster solution.
So my question is: Is there any other (and faster) ways to find the intersection between a ray and a surface? Or can you point me in the direction of literature that explains the calculations I need to roll my own?
Thanks!
UPDATE: I have started the process of creating my own Line of Sight algorithm. I have posted my current solution description in a blog post. Thanks again for all of the suggestions.
If you really want to roll your own, it sounds like you may need a ray caster/ray tracer. A ten year old paper describes the state of the art (back then): you have to convert the surface to a TIN and create a 3D data structure (the authors propose a BSP tree of voxels) to expedite finding the intersections. Maybe you could get hold of a ray tracing engine and deploy it.
Are there more options?
I can not participate now in discussion - there is no free time. But I will be released - I will necessarily write that I think on this question.
and another variant is?
No conversations!